public class OidcException

  1. Object
  2. Throwable
  3. Exception
  4. IOException
  5. OidcException
Thrown for failures during an OpenID Connect / OAuth 2.0 flow driven by OidcClient. The getError() code mirrors the error field from RFC 6749 for authorization-server responses (e.g. "access_denied", "invalid_grant") and uses Codename One-specific values for transport or client-side problems ("transport_error", "state_mismatch", "nonce_mismatch", "user_cancelled", "discovery_failed", "invalid_id_token").

Fields

public static final String ACCESS_DENIED = "access_denied"Authorization server returned error=access_denied.
public static final String USER_CANCELLED = "user_cancelled"User cancelled the system browser / native sign-in sheet.
public static final String STATE_MISMATCH = "state_mismatch"state returned by the authorization server did not match the one we sent.
public static final String NONCE_MISMATCH = "nonce_mismatch"nonce claim on the returned ID token did not match the one we sent.
public static final String DISCOVERY_FAILED = "discovery_failed"The discovery document could not be fetched or parsed.
public static final String INVALID_GRANT = "invalid_grant"Token-endpoint response was missing or malformed.
public static final String INVALID_ID_TOKEN = "invalid_id_token"ID token failed structural validation (we do not currently verify the signature – treat the issuer as a trust anchor and use TLS to the discovery URL).
public static final String TRANSPORT_ERROR = "transport_error"Generic transport / network failure.

Constructors

public OidcException(String error, String message)
public OidcException(String error, String message, Throwable cause)

Methods

public String getError()The short error code (see the constants on this class).
public String getErrorDescription()Human-readable description supplied by the server or the client.

Inherited methods

Field details

ACCESS_DENIED

public static final String ACCESS_DENIED = "access_denied"
Authorization server returned error=access_denied.

USER_CANCELLED

public static final String USER_CANCELLED = "user_cancelled"
User cancelled the system browser / native sign-in sheet.

STATE_MISMATCH

public static final String STATE_MISMATCH = "state_mismatch"
state returned by the authorization server did not match the one we sent.

NONCE_MISMATCH

public static final String NONCE_MISMATCH = "nonce_mismatch"
nonce claim on the returned ID token did not match the one we sent.

DISCOVERY_FAILED

public static final String DISCOVERY_FAILED = "discovery_failed"
The discovery document could not be fetched or parsed.

INVALID_GRANT

public static final String INVALID_GRANT = "invalid_grant"
Token-endpoint response was missing or malformed.

INVALID_ID_TOKEN

public static final String INVALID_ID_TOKEN = "invalid_id_token"
ID token failed structural validation (we do not currently verify the signature – treat the issuer as a trust anchor and use TLS to the discovery URL).

TRANSPORT_ERROR

public static final String TRANSPORT_ERROR = "transport_error"
Generic transport / network failure.

Constructor details

OidcException

public OidcException(String error, String message)

OidcException

public OidcException(String error, String message, Throwable cause)

Method details

getError

public String getError()
The short error code (see the constants on this class).

getErrorDescription

public String getErrorDescription()
Human-readable description supplied by the server or the client.