Package org.keycloak.admin.client.token
Class TokenManager
- java.lang.Object
-
- org.keycloak.admin.client.token.TokenManager
-
public class TokenManager extends Object
- Author:
- rodrigo.sasaki@icarros.com.br
-
-
Constructor Summary
Constructors Constructor Description TokenManager(Config config, javax.ws.rs.client.Client client)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccessTokenResponse
getAccessToken()
String
getAccessTokenString()
AccessTokenResponse
grantToken()
void
invalidate(String token)
Invalidates the current token, but only when it is equal to the token passed as an argument.void
logout()
AccessTokenResponse
refreshToken()
void
setMinTokenValidity(long minTokenValidity)
-
-
-
Constructor Detail
-
TokenManager
public TokenManager(Config config, javax.ws.rs.client.Client client)
-
-
Method Detail
-
getAccessTokenString
public String getAccessTokenString()
-
getAccessToken
public AccessTokenResponse getAccessToken()
-
grantToken
public AccessTokenResponse grantToken()
-
refreshToken
public AccessTokenResponse refreshToken()
-
logout
public void logout()
-
setMinTokenValidity
public void setMinTokenValidity(long minTokenValidity)
-
invalidate
public void invalidate(String token)
Invalidates the current token, but only when it is equal to the token passed as an argument.- Parameters:
token
- the token to invalidate (cannot be null).
-
-