public OAuth1(String consumerKey, String consumerSecret, String token, String tokenSecret) { this.consumerKey = Preconditions.checkNotNull(consumerKey); this.consumerSecret = Preconditions.checkNotNull(consumerSecret); this.token = Preconditions.checkNotNull(token); this.tokenSecret = Preconditions.checkNotNull(tokenSecret); this.normalizer = Normalizer.getStandardNormalizer(); this.signer = Signer.getStandardSigner(); this.secureRandom = new SecureRandom(); }
public static Verifier newVerifier(int maxClockFloatAheadMins, int maxClockFloatBehindMins) { return newVerifier( Signer.getStandardSigner(), maxClockFloatAheadMins, maxClockFloatBehindMins, NonceValidator.NO_OP_NONCE_VALIDATOR ); }
public static Verifier newVerifier() { return newVerifier( Signer.getStandardSigner(), NO_TIMESTAMP_CHECK, NO_TIMESTAMP_CHECK, NonceValidator.NO_OP_NONCE_VALIDATOR ); }
public static Verifier newVerifier( Signer sign, int maxClockFloatAheadMins, int maxClockFloatBehindMins, NonceValidator validateNonce ) { return new StandardVerifier(sign, maxClockFloatAheadMins, maxClockFloatBehindMins, validateNonce); } }
@Autowired public TwitterOAuth(TwitterProperties twitterProps) { this.consumerKey = twitterProps.getConsumerKey(); this.consumerSecret = twitterProps.getConsumerSecret(); this.token = twitterProps.getToken(); this.tokenSecret = twitterProps.getSecret(); this.normalizer = Normalizer.getStandardNormalizer(); this.signer = Signer.getStandardSigner(); this.secureRandom = new SecureRandom(); }