Record Class OidcTenantConfig

java.lang.Object
java.lang.Record
io.fluxzero.idp.client.OidcTenantConfig
Record Components:
issuer - issuer URL expected in trusted tokens
clientId - OIDC client id used for the authorization-code flow and ID token audience
redirectUri - callback URL registered with the tenant
resourceAudience - audience expected for access tokens accepted by backend APIs
scope - scopes requested during login, defaults to openid profile email
clientCredentials - token endpoint credentials for confidential BFF clients

public record OidcTenantConfig(String issuer, String clientId, String redirectUri, String resourceAudience, String scope, OidcClientCredentials clientCredentials) extends Record
Tenant-specific OIDC settings for a Fluxzero application.

A Fluxzero application should authenticate against the tenant configured for that application, not against a global Fluxzero IDP tenant. For local development the local stub IDP uses the same shape: an issuer, client id, redirect URI and resource audience. Keeping these values explicit makes the difference between production and local development a configuration/classpath concern rather than a different authentication implementation.

  • Constructor Details

    • OidcTenantConfig

      public OidcTenantConfig(String issuer, String clientId, String redirectUri, String resourceAudience, String scope)
    • OidcTenantConfig

      public OidcTenantConfig(String issuer, String clientId, String redirectUri, String resourceAudience, String scope, OidcClientCredentials clientCredentials)
      Creates an instance of a OidcTenantConfig record class.
      Parameters:
      issuer - the value for the issuer record component
      clientId - the value for the clientId record component
      redirectUri - the value for the redirectUri record component
      resourceAudience - the value for the resourceAudience record component
      scope - the value for the scope record component
      clientCredentials - the value for the clientCredentials record component
  • Method Details

    • normalizeIssuer

      public static String normalizeIssuer(String issuer)
      Normalizes an issuer for exact claim comparison.
      Parameters:
      issuer - configured issuer
      Returns:
      issuer without trailing slashes
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • issuer

      public String issuer()
      Returns the value of the issuer record component.
      Returns:
      the value of the issuer record component
    • clientId

      public String clientId()
      Returns the value of the clientId record component.
      Returns:
      the value of the clientId record component
    • redirectUri

      public String redirectUri()
      Returns the value of the redirectUri record component.
      Returns:
      the value of the redirectUri record component
    • resourceAudience

      public String resourceAudience()
      Returns the value of the resourceAudience record component.
      Returns:
      the value of the resourceAudience record component
    • scope

      public String scope()
      Returns the value of the scope record component.
      Returns:
      the value of the scope record component
    • clientCredentials

      public OidcClientCredentials clientCredentials()
      Returns the value of the clientCredentials record component.
      Returns:
      the value of the clientCredentials record component