Class Auth0Authentication
java.lang.Object
io.camunda.identity.sdk.authentication.AbstractAuthentication
io.camunda.identity.sdk.impl.auth0.authentication.Auth0Authentication
- All Implemented Interfaces:
Authentication
-
Field Summary
Fields inherited from class io.camunda.identity.sdk.authentication.AbstractAuthentication
configuration, JWKS_CACHE_LIFETIME_DAYS, JWKS_CACHE_SIZE, restClient, tokenCache, WELL_KNOWN_PATH -
Constructor Summary
ConstructorsConstructorDescriptionAuth0Authentication(IdentityConfiguration configuration, RestClient restClient) -
Method Summary
Modifier and TypeMethodDescriptionauthorizeUriBuilder(String redirectUri) Returns a new Authorize uri builder.exchangeAuthCode(AuthCodeDto authCodeDto, String redirectUri) Exchanges provided auth code with access tokens.getAssignedOrganizations(com.auth0.jwt.interfaces.DecodedJWT token) getClientId(String token) Gets the client ID associated to the tokengetPermissions(com.auth0.jwt.interfaces.DecodedJWT token, String audience) booleanisM2MToken(String token) Checks if the token passed in is considered an M2M token.protected booleanprotected booleanprotected com.auth0.jwk.JwkProviderrenewToken(String refreshToken) Exchanges provided refresh token with an access tokens.protected TokensrequestFreshToken(String audience) voidrevokeToken(String refreshToken) Logs out from Identity backend.protected WellKnownConfigurationMethods inherited from class io.camunda.identity.sdk.authentication.AbstractAuthentication
decodeJWT, generateSingleSignOutUri, getGroups, getGroups, getGroupsInOrganization, getGroupsInOrganization, getGroupsInOrganization, getPermissions, getPermissions, getUserDetails, isAvailable, requestToken, singleSignOut, singleSignOutUriBuilder, verifyAndDecode, verifyToken, verifyToken, verifyToken, verifyTokenIgnoringAudience
-
Constructor Details
-
Auth0Authentication
-
-
Method Details
-
authorizeUriBuilder
Description copied from interface:AuthenticationReturns a new Authorize uri builder. It is used to build the authorize uri for user authentication.- Parameters:
redirectUri- the redirect uri- Returns:
- the authorize uri builder
-
exchangeAuthCode
public Tokens exchangeAuthCode(AuthCodeDto authCodeDto, String redirectUri) throws CodeExchangeException Description copied from interface:AuthenticationExchanges provided auth code with access tokens. The provided redirect uri argument must match the redirect uri that was used to build the authorize uri.- Parameters:
authCodeDto- the auth code dtoredirectUri- the redirect uri- Returns:
- the tokens
- Throws:
CodeExchangeException- if code exchange fails
-
requestFreshToken
- Specified by:
requestFreshTokenin classAbstractAuthentication
-
renewToken
Description copied from interface:AuthenticationExchanges provided refresh token with an access tokens.- Parameters:
refreshToken- refresh token used for the request- Returns:
- the tokens
-
revokeToken
Description copied from interface:AuthenticationLogs out from Identity backend. This will invalidate the given refresh token and refresh tokens issued for other applications during the same session. The user's session or access token still has to be deleted by the client application.- Parameters:
refreshToken- refresh token used for the request
-
isM2MToken
Description copied from interface:AuthenticationChecks if the token passed in is considered an M2M token.- Parameters:
token- the token- Returns:
- true if the token is a M2M token, else false
-
getClientId
Description copied from interface:AuthenticationGets the client ID associated to the token- Parameters:
token- the token- Returns:
- the clientID
-
getPermissions
- Specified by:
getPermissionsin classAbstractAuthentication
-
getAssignedOrganizations
-
jwkProvider
protected com.auth0.jwk.JwkProvider jwkProvider()- Specified by:
jwkProviderin classAbstractAuthentication
-
wellKnownConfiguration
- Specified by:
wellKnownConfigurationin classAbstractAuthentication
-
isRevokeAvailable
protected boolean isRevokeAvailable()- Specified by:
isRevokeAvailablein classAbstractAuthentication
-
isSingleSignOutAvailable
protected boolean isSingleSignOutAvailable()- Specified by:
isSingleSignOutAvailablein classAbstractAuthentication
-