Class D4ScienceIAMClientAuthn4Code

All Implemented Interfaces:
IAMResponse

public class D4ScienceIAMClientAuthn4Code extends D4ScienceIAMClientAuthn
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 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 client
      clientId - the client id the code was issued to
      clientSecret - the client secret, null or empty for a public client
      code - the authorization code
      redirectUri - the redirect URI used in the authorization request
      codeVerifier - the PKCE code verifier, null if PKCE was not used
      Throws:
      D4ScienceIAMClientException - if the exchange fails