示例#1
0
 @Override
 protected void internalInit(final WebContext context) {
   super.internalInit(context);
   CommonHelper.assertNotNull("scope", this.scope);
   if (this.scope == Google2Scope.EMAIL) {
     this.scopeValue = this.EMAIL_SCOPE;
   } else if (this.scope == Google2Scope.PROFILE) {
     this.scopeValue = this.PROFILE_SCOPE;
   } else {
     this.scopeValue = this.PROFILE_SCOPE + " " + this.EMAIL_SCOPE;
   }
   this.service =
       new StateOAuth20ServiceImpl(
           new GoogleApi20(),
           new OAuthConfig(
               this.key,
               this.secret,
               computeFinalCallbackUrl(context),
               SignatureType.Header,
               this.scopeValue,
               null),
           this.connectTimeout,
           this.readTimeout,
           this.proxyHost,
           this.proxyPort,
           false,
           true);
 }
示例#2
0
 @Override
 protected void internalInit() {
   super.internalInit();
   this.service =
       new ExtendedOAuth20ServiceImpl(
           new WordPressApi(),
           new OAuthConfig(
               this.key, this.secret, this.callbackUrl, SignatureType.Header, null, null),
           this.connectTimeout,
           this.readTimeout,
           this.proxyHost,
           this.proxyPort);
 }
示例#3
0
 @Override
 protected void internalInit() {
   super.internalInit();
   CommonHelper.assertNotBlank("scope", this.scope);
   CommonHelper.assertNotBlank("fields", this.fields);
   StateApi20 api20 = new LinkedInApi20();
   this.service =
       new LinkedInOAuth20ServiceImpl(
           api20,
           new OAuthConfig(
               this.key, this.secret, this.callbackUrl, SignatureType.Header, this.scope, null),
           this.connectTimeout,
           this.readTimeout,
           this.proxyHost,
           this.proxyPort);
 }
示例#4
0
 @Override
 protected void internalInit(final WebContext context) {
   CommonHelper.assertNotBlank("publicKey", this.publicKey);
   super.internalInit(context);
 }