Package org.forgerock.oauth2.core
Class TokenInvalidator
- java.lang.Object
-
- org.forgerock.oauth2.core.TokenInvalidator
-
public class TokenInvalidator extends Object
Invalidates tokens and all their associated tokens. i.e. an Access Token and the Refresh Tokens and Authorization code used to issue or refresh it.- Since:
- 12.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static CoreTokenField
CLIENT_ID_FIELD
static CoreTokenField
GRANT_ID_FIELD
static CoreTokenField
USERNAME_FIELD
-
Constructor Summary
Constructors Constructor Description TokenInvalidator(TokenStore tokenStore, OAuth2RealmResolver realmResolver)
Constructs a new TokenInvalidator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
invalidateTokens(OAuth2Request request, String clientId, String userName, String authGrantId)
Invalidates all tokens associated with same auth grant, client and resource owner.
-
-
-
Field Detail
-
GRANT_ID_FIELD
public static final CoreTokenField GRANT_ID_FIELD
-
CLIENT_ID_FIELD
public static final CoreTokenField CLIENT_ID_FIELD
-
USERNAME_FIELD
public static final CoreTokenField USERNAME_FIELD
-
-
Constructor Detail
-
TokenInvalidator
@Inject public TokenInvalidator(TokenStore tokenStore, OAuth2RealmResolver realmResolver)
Constructs a new TokenInvalidator.- Parameters:
tokenStore
- An instance of the TokenStore.realmResolver
- An instance of the OAuth2RealmResolver
-
-
Method Detail
-
invalidateTokens
public void invalidateTokens(OAuth2Request request, String clientId, String userName, String authGrantId) throws ServerException, NotFoundException
Invalidates all tokens associated with same auth grant, client and resource owner.- Parameters:
request
- The request.clientId
- The client id.userName
- The username denoting the resource owner idauthGrantId
- The auth grant id.- Throws:
ServerException
NotFoundException
-
-