public final class InMemoryOAuth2AuthorizationConsentService extends java.lang.Object implements OAuth2AuthorizationConsentService
OAuth2AuthorizationConsentService that stores OAuth2AuthorizationConsent's in-memory.
NOTE: This implementation should ONLY be used during development/testing.
OAuth2AuthorizationConsentService| Constructor and Description |
|---|
InMemoryOAuth2AuthorizationConsentService()
Constructs an
InMemoryOAuth2AuthorizationConsentService. |
InMemoryOAuth2AuthorizationConsentService(java.util.List<OAuth2AuthorizationConsent> authorizationConsents)
Constructs an
InMemoryOAuth2AuthorizationConsentService using the provided parameters. |
InMemoryOAuth2AuthorizationConsentService(OAuth2AuthorizationConsent... authorizationConsents)
Constructs an
InMemoryOAuth2AuthorizationConsentService using the provided parameters. |
| Modifier and Type | Method and Description |
|---|---|
OAuth2AuthorizationConsent |
findById(java.lang.String registeredClientId,
java.lang.String principalName)
Returns the
OAuth2AuthorizationConsent identified by the provided
registeredClientId and principalName, or null if not found. |
void |
remove(OAuth2AuthorizationConsent authorizationConsent)
Removes the
OAuth2AuthorizationConsent. |
void |
save(OAuth2AuthorizationConsent authorizationConsent)
Saves the
OAuth2AuthorizationConsent. |
public InMemoryOAuth2AuthorizationConsentService()
InMemoryOAuth2AuthorizationConsentService.public InMemoryOAuth2AuthorizationConsentService(OAuth2AuthorizationConsent... authorizationConsents)
InMemoryOAuth2AuthorizationConsentService using the provided parameters.authorizationConsents - the authorization consent(s)public InMemoryOAuth2AuthorizationConsentService(java.util.List<OAuth2AuthorizationConsent> authorizationConsents)
InMemoryOAuth2AuthorizationConsentService using the provided parameters.authorizationConsents - the authorization consent(s)public void save(OAuth2AuthorizationConsent authorizationConsent)
OAuth2AuthorizationConsentServiceOAuth2AuthorizationConsent.save in interface OAuth2AuthorizationConsentServiceauthorizationConsent - the OAuth2AuthorizationConsentpublic void remove(OAuth2AuthorizationConsent authorizationConsent)
OAuth2AuthorizationConsentServiceOAuth2AuthorizationConsent.remove in interface OAuth2AuthorizationConsentServiceauthorizationConsent - the OAuth2AuthorizationConsent@Nullable public OAuth2AuthorizationConsent findById(java.lang.String registeredClientId, java.lang.String principalName)
OAuth2AuthorizationConsentServiceOAuth2AuthorizationConsent identified by the provided
registeredClientId and principalName, or null if not found.findById in interface OAuth2AuthorizationConsentServiceregisteredClientId - the identifier for the RegisteredClientprincipalName - the name of the PrincipalOAuth2AuthorizationConsent if found, otherwise null