Enum Class ClientCredentialsExchangeException.Phase

java.lang.Object
java.lang.Enum<ClientCredentialsExchangeException.Phase>
co.ankatech.ankasecure.sdk.auth.ClientCredentialsExchangeException.Phase
All Implemented Interfaces:
Serializable, Comparable<ClientCredentialsExchangeException.Phase>, Constable
Enclosing class:
ClientCredentialsExchangeException

public static enum ClientCredentialsExchangeException.Phase extends Enum<ClientCredentialsExchangeException.Phase>
Where in the exchange the failure happened. Exactly one applies to any failure.
  • Enum Constant Details

    • DISCOVERY_UNREACHABLE

      public static final ClientCredentialsExchangeException.Phase DISCOVERY_UNREACHABLE
      The discovery document could not be fetched at all - no HTTP status was obtained.
    • DISCOVERY_MALFORMED

      public static final ClientCredentialsExchangeException.Phase DISCOVERY_MALFORMED
      A response arrived but is not a usable discovery document: a non-200 status, a redirect, a body that is not JSON, a missing member, an issuer that is not the configured one, or a token_endpoint that is absent or not an absolute https URL.
    • TOKEN_ENDPOINT_OFF_ORIGIN

      public static final ClientCredentialsExchangeException.Phase TOKEN_ENDPOINT_OFF_ORIGIN
      The document named a token_endpoint on an origin other than the issuer's own.

      Its own phase because it is the one failure here that is an ATTEMPT rather than a fault: the document is the remote party's to write, and this is the SDK refusing to post a credential to a host nobody configured. It is decided before any request object exists, so the named origin receives no connection.

    • TOKEN_ENDPOINT_UNREACHABLE

      public static final ClientCredentialsExchangeException.Phase TOKEN_ENDPOINT_UNREACHABLE
      The token endpoint could not be reached - no HTTP status was obtained.
    • CREDENTIALS_REFUSED

      public static final ClientCredentialsExchangeException.Phase CREDENTIALS_REFUSED
      The token endpoint answered, and refused the external credential. Carries the status the authorization server returned, and nothing from its body.
    • TOKEN_RESPONSE_MALFORMED

      public static final ClientCredentialsExchangeException.Phase TOKEN_RESPONSE_MALFORMED
      The token endpoint answered 200 with something that is not a usable token response: not JSON, no access_token, a token_type other than Bearer, or a non-positive expires_in.
  • Method Details

    • values

      public static ClientCredentialsExchangeException.Phase[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ClientCredentialsExchangeException.Phase valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null