Interface IClientAuthSvc


public interface IClientAuthSvc
Interface for the client authentication service to handle token acquisition from an OpenID Connect (OIDC) Identity Provider using client-specific configurations.

This interface provides a method to request and retrieve an authorization token based on the provided authentication state. It is intended to support various authorization flows, as defined by the OIDC and SMART on FHIR standards.

  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves an authorization token from an OpenID Connect (OIDC) Identity Provider using the given authentication state.
  • Method Details

    • getAuthTokenOrThrow

      Retrieves an authorization token from an OpenID Connect (OIDC) Identity Provider using the given authentication state. If the token cannot be retrieved due to an authentication failure or another error, this method throws an appropriate exception.

      Parameters:
      theState - The authentication state containing client credentials and configuration necessary to obtain the authorization token.
      Returns:
      An OpenIdTokenResponse object containing the authorization token and related information such as expiration time and token type.
      Throws:
      IllegalArgumentException - If required authentication parameters are missing or invalid.
      InternalErrorException - If the authorization request fails, such as receiving an error response from the authorization server.