Record Class DeviceFlowProperties

java.lang.Object
java.lang.Record
com.irurueta.authserver.serviceclient.device.DeviceFlowProperties
Record Components:
issuer - base URL of the authorization server, for example http://localhost:9000; mandatory.
clientId - the public client; "device-client" when blank.
scope - scopes requested, separated by spaces; "profile documents.read" when blank.
printAccessToken - whether the final output also carries the access token; off unless a caller needs it.

@ConfigurationProperties("device-flow") public record DeviceFlowProperties(URI issuer, String clientId, String scope, boolean printAccessToken) extends Record
Settings of the device flow CLI, bound from device-flow.* (command-line arguments or environment variables such as DEVICE_FLOW_ISSUER).
  • Field Details

    • issuer

      private final URI issuer
      The field for the issuer record component.
    • clientId

      private final String clientId
      The field for the clientId record component.
    • scope

      private final String scope
      The field for the scope record component.
    • printAccessToken

      private final boolean printAccessToken
      The field for the printAccessToken record component.
    • DEFAULT_CLIENT_ID

      public static final String DEFAULT_CLIENT_ID
      The public client the development data seeds for this flow.
      See Also:
    • DEFAULT_SCOPE

      public static final String DEFAULT_SCOPE
      Scopes the seeded client may request.
      See Also:
  • Constructor Details

    • DeviceFlowProperties

      public DeviceFlowProperties(URI issuer, String clientId, String scope, boolean printAccessToken)
      Validates the issuer and applies the defaults.
      Parameters:
      issuer - base URL of the authorization server.
      clientId - the public client.
      scope - scopes requested.
      printAccessToken - whether the access token is printed.
  • Method Details

    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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 URI 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
    • scope

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

      public boolean printAccessToken()
      Returns the value of the printAccessToken record component.
      Returns:
      the value of the printAccessToken record component