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 examplehttp://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 Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for theclientIdrecord component.static final StringThe public client the development data seeds for this flow.static final StringScopes the seeded client may request.private final URIThe field for theissuerrecord component.private final booleanThe field for theprintAccessTokenrecord component.private final StringThe field for thescoperecord component. -
Constructor Summary
ConstructorsConstructorDescriptionDeviceFlowProperties(URI issuer, String clientId, String scope, boolean printAccessToken) Validates the issuer and applies the defaults. -
Method Summary
Modifier and TypeMethodDescriptionclientId()Returns the value of theclientIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.issuer()Returns the value of theissuerrecord component.booleanReturns the value of theprintAccessTokenrecord component.scope()Returns the value of thescoperecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
issuer
The field for theissuerrecord component. -
clientId
The field for theclientIdrecord component. -
scope
The field for thescoperecord component. -
printAccessToken
private final boolean printAccessTokenThe field for theprintAccessTokenrecord component. -
DEFAULT_CLIENT_ID
The public client the development data seeds for this flow.- See Also:
-
DEFAULT_SCOPE
Scopes the seeded client may request.- See Also:
-
-
Constructor Details
-
DeviceFlowProperties
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
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
issuer
Returns the value of theissuerrecord component.- Returns:
- the value of the
issuerrecord component
-
clientId
Returns the value of theclientIdrecord component.- Returns:
- the value of the
clientIdrecord component
-
scope
Returns the value of thescoperecord component.- Returns:
- the value of the
scoperecord component
-
printAccessToken
public boolean printAccessToken()Returns the value of theprintAccessTokenrecord component.- Returns:
- the value of the
printAccessTokenrecord component
-