Record Class OidcProvider

java.lang.Object
java.lang.Record
dev.relism.flash.ext.security.oidc.OidcProvider
Record Components:
id - names the provider in routes (/auth/oidc/{id}/login), OpenAPI and principals
name - what a sign-in page shows
issuer - exactly as the provider publishes it — some end in /
scopes - requested at sign-in, space-delimited

public record OidcProvider(String id, String name, String issuer, String clientId, String clientSecret, String scopes) extends Record
An OpenID Provider the application trusts, and the client the application is registered as there.
  • Constructor Details

    • OidcProvider

      public OidcProvider(String id, String name, String issuer, String clientId, String clientSecret, String scopes)
      Creates an instance of a OidcProvider record class.
      Parameters:
      id - the value for the id record component
      name - the value for the name record component
      issuer - the value for the issuer record component
      clientId - the value for the clientId record component
      clientSecret - the value for the clientSecret record component
      scopes - the value for the scopes record component
  • Method Details

    • of

      public static OidcProvider of(String id, String issuer, String clientId, String clientSecret)
    • name

      public OidcProvider name(String name)
    • scopes

      public OidcProvider scopes(String scopes)
    • 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.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • 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
    • clientSecret

      public String clientSecret()
      Returns the value of the clientSecret record component.
      Returns:
      the value of the clientSecret record component
    • scopes

      public String scopes()
      Returns the value of the scopes record component.
      Returns:
      the value of the scopes record component