public final class InMemoryOAuth2AuthorizationService extends java.lang.Object implements OAuth2AuthorizationService
OAuth2AuthorizationService that stores OAuth2Authorization's in-memory.
NOTE: This implementation should ONLY be used during development/testing.
OAuth2AuthorizationService| Constructor and Description |
|---|
InMemoryOAuth2AuthorizationService()
Constructs an
InMemoryOAuth2AuthorizationService. |
InMemoryOAuth2AuthorizationService(java.util.List<OAuth2Authorization> authorizations)
Constructs an
InMemoryOAuth2AuthorizationService using the provided parameters. |
InMemoryOAuth2AuthorizationService(OAuth2Authorization... authorizations)
Constructs an
InMemoryOAuth2AuthorizationService using the provided parameters. |
| Modifier and Type | Method and Description |
|---|---|
OAuth2Authorization |
findById(java.lang.String id)
|
OAuth2Authorization |
findByToken(java.lang.String token,
OAuth2TokenType tokenType)
|
void |
remove(OAuth2Authorization authorization)
Removes the
OAuth2Authorization. |
void |
save(OAuth2Authorization authorization)
Saves the
OAuth2Authorization. |
public InMemoryOAuth2AuthorizationService()
InMemoryOAuth2AuthorizationService.public InMemoryOAuth2AuthorizationService(OAuth2Authorization... authorizations)
InMemoryOAuth2AuthorizationService using the provided parameters.authorizations - the authorization(s)public InMemoryOAuth2AuthorizationService(java.util.List<OAuth2Authorization> authorizations)
InMemoryOAuth2AuthorizationService using the provided parameters.authorizations - the authorization(s)public void save(OAuth2Authorization authorization)
OAuth2AuthorizationServiceOAuth2Authorization.save in interface OAuth2AuthorizationServiceauthorization - the OAuth2Authorizationpublic void remove(OAuth2Authorization authorization)
OAuth2AuthorizationServiceOAuth2Authorization.remove in interface OAuth2AuthorizationServiceauthorization - the OAuth2Authorization@Nullable public OAuth2Authorization findById(java.lang.String id)
OAuth2AuthorizationServicefindById in interface OAuth2AuthorizationServiceid - the authorization identifierOAuth2Authorization if found, otherwise null@Nullable public OAuth2Authorization findByToken(java.lang.String token, @Nullable OAuth2TokenType tokenType)
OAuth2AuthorizationServicefindByToken in interface OAuth2AuthorizationServicetoken - the token credentialtokenType - the token typeOAuth2Authorization if found, otherwise null