protected String getClientKey(final OAuth2Client client) { return this.getClientKey(client.getGadgetUri(), client.getServiceName()); }
@Override public String toString() { return "org.apache.shindig.gadgets.oauth2.persistence.sample.OAuth2TokenImpl: serviceName = " + this.serviceName + " , user = " + this.user + " , gadgetUri = " + this.gadgetUri + " , scope = " + this.scope + " , tokenType = " + this.getTokenType() + " , issuedAt = " + this.issuedAt + " , expiresAt = " + this.expiresAt + " , type = " + this.type; } }
@Override protected String getTokenKey(final OAuth2Token token) { return super.getTokenKey(token); } }
private static void setClientCommons(final OAuth2Client client) throws Exception { client.setAuthorizationUrl(MockUtils.AUTHORIZE_URL); client.setGrantType(OAuth2Message.AUTHORIZATION_CODE); client.setRedirectUri(MockUtils.REDIRECT_URI); client.setServiceName(MockUtils.SERVICE_NAME); client.setTokenUrl(MockUtils.TOKEN_URL); }
public void storeClient(final OAuth2Client client) throws OAuth2CacheException { if (client != null) { final String clientKey = this.getClientKey(client.getGadgetUri(), client.getServiceName()); this.getClientMap().put(clientKey, client); } }
protected OAuth2Token internalCreateToken() { return new OAuth2TokenPersistence(this.encrypter); }
public void setEncryptedSecret(final byte[] encryptedSecret) throws OAuth2EncryptionException { this.encryptedSecret = encryptedSecret; if (this.encrypter != null) { this.clientSecret = this.encrypter.decrypt(encryptedSecret); } }
@Override protected String getAccessorKey(final OAuth2CallbackState state) { return super.getAccessorKey(state); }
@Override protected String getClientKey(final String gadgetUri, final String serviceName) { return super.getClientKey(gadgetUri, serviceName); }
public void storeTokens(final Collection<OAuth2Token> storeTokens) throws OAuth2CacheException { if (storeTokens != null) { for (final OAuth2Token token : storeTokens) { this.storeToken(token); } } }
public void storeClients(final Collection<OAuth2Client> clients) throws OAuth2CacheException { if (clients != null) { for (final OAuth2Client client : clients) { this.storeClient(client); } } }
public void setClientSecret(final byte[] secret) throws OAuth2EncryptionException { this.clientSecret = secret; if (this.encrypter != null) { this.encryptedSecret = this.encrypter.encrypt(secret); } }
public OAuth2Client invalidateClient(final OAuth2Client client) { return this.cache.removeClient(client); }
public OAuth2Token invalidateToken(final OAuth2Token token) { return this.cache.removeToken(token); }
private static void setClientCommons(final OAuth2Client client) throws Exception { client.setAuthorizationUrl(MockUtils.AUTHORIZE_URL); client.setGrantType(OAuth2Message.AUTHORIZATION_CODE); client.setRedirectUri(MockUtils.REDIRECT_URI); client.setServiceName(MockUtils.SERVICE_NAME); client.setTokenUrl(MockUtils.TOKEN_URL); }
public void setEncryptedMacSecret(final byte[] encryptedSecret) throws OAuth2EncryptionException { this.encryptedMacSecret = encryptedSecret; this.macSecret = this.encrypter == null ? encryptedSecret : this.encrypter.decrypt(encryptedSecret); }
@Override protected String getTokenKey(final String gadgetUri, final String serviceName, final String user, final String scope, final Type type) { return super.getTokenKey(gadgetUri, serviceName, user, scope, type); }
@Override protected String getAccessorKey(final OAuth2Accessor accessor) { return super.getAccessorKey(accessor); }
@Override protected String getClientKey(final OAuth2Client client) { return super.getClientKey(client); }
public void setEncryptedSecret(final byte[] encryptedSecret) throws OAuth2EncryptionException { this.encryptedSecret = encryptedSecret; this.secret = this.encrypter == null ? encryptedSecret : this.encrypter.decrypt(encryptedSecret); }