public class DefaultRevocationRegistry extends Object implements RevocationRegistry
A simple RevocationRegistry
that keeps the revoked token ids in a memory-only cache. This registry is only
used if no
other implementation has been configured and it doesn't persist the revoked ids. For these reasons it is highly
recommended
that this implementation be used only in testing scenarios.
Constructor and Description |
---|
DefaultRevocationRegistry() |
Modifier and Type | Method and Description |
---|---|
boolean |
isRevoked(String tokenType,
String id)
Indicates whether the token with the specified id has been revoked or not.
|
void |
revokeToken(String tokenType,
String id)
Adds the specified id to the revocation registry.
|
public boolean isRevoked(String tokenType, String id)
RevocationRegistry
Indicates whether the token with the specified id has been revoked or not.
isRevoked
in interface RevocationRegistry
tokenType
- a String
representing the token type.id
- a String
representing the token id.true
if the specified id has been revoked; false
otherwise.public void revokeToken(String tokenType, String id)
RevocationRegistry
Adds the specified id to the revocation registry. The security token type can be used to distinguish tokens that may have the same id but that are of different types.
revokeToken
in interface RevocationRegistry
tokenType
- a String
representing the security token type.id
- the id to registered.Copyright © 2021 JBoss by Red Hat. All rights reserved.