Package org.gcube.common.iam
Class D4ScienceIAMClientAuthn4Code
java.lang.Object
org.gcube.common.iam.AbstractIAMResponse
org.gcube.common.iam.D4ScienceIAMClientAuthn
org.gcube.common.iam.D4ScienceIAMClientAuthn4Code
- All Implemented Interfaces:
IAMResponse
D4Science IAM client authentication implementation for the authorization code flow: the tokens are obtained by
exchanging the code the browser brought back on the redirect URI.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedD4ScienceIAMClientAuthn4Code(D4ScienceIAMClient iamClient, String clientId, String clientSecret, String code, String redirectUri, String codeVerifier) Exchanges the authorization code for the tokens. -
Method Summary
Methods inherited from class org.gcube.common.iam.D4ScienceIAMClientAuthn
authorize, authorizeMethods inherited from class org.gcube.common.iam.AbstractIAMResponse
canBeRefreshed, exchange, exchangeForRefreshToken, getAccessToken, getAccessTokenString, getAudience, getAuthorizedParty, getContactOrganization, getContactPerson, getContext, getContextRoles, getEmail, getExpiresIn, getFamilyName, getGivenName, getGlobalRoles, getIamClient, getIdTokenString, getName, getPreferredUsername, getRefreshExpiresIn, getRefreshTokenString, getResourceAccessRoles, getResourceRoles, getRoles, getSubject, getTokenResponse, isAccessTokenValid, isAccessTokenValid, isExpired, isRefreshTokenValid, isRefreshTokenValid, logout, refresh, refresh, setIamClient, setTokenResponse, verifyAccessToken, verifyAccessToken, verifyRefreshToken, verifyRefreshToken
-
Constructor Details
-
D4ScienceIAMClientAuthn4Code
protected D4ScienceIAMClientAuthn4Code(D4ScienceIAMClient iamClient, String clientId, String clientSecret, String code, String redirectUri, String codeVerifier) throws D4ScienceIAMClientException Exchanges the authorization code for the tokens.- Parameters:
iamClient- the IAM clientclientId- the client id the code was issued toclientSecret- the client secret,nullor empty for a public clientcode- the authorization coderedirectUri- the redirect URI used in the authorization requestcodeVerifier- the PKCE code verifier,nullif PKCE was not used- Throws:
D4ScienceIAMClientException- if the exchange fails
-