Record Class LegacyImplicitProperties
java.lang.Object
java.lang.Record
com.irurueta.authserver.authorization.api.web.implicit.LegacyImplicitProperties
- Record Components:
clientId- identifier of the only client that may use the flow.redirectUri- the only redirect URI of that client.scopes- scopes the client may request.audience- audience of the access tokens it gets.accessTokenTtl- lifetime of the access tokens, at mostMAX_ACCESS_TOKEN_TTL.
@ConfigurationProperties(prefix="authserver.legacy-implicit")
public record LegacyImplicitProperties(String clientId, String redirectUri, List<String> scopes, String audience, Duration accessTokenTtl)
extends Record
Settings of the legacy implicit flow, bound from
authserver.legacy-implicit.* (see
application-legacy-implicit.yml). The flow exists only to show why OAuth 2.1 removed it, so it is limited to
one client, one redirect URI, a restricted audience and scope, and a short lifetime.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DurationThe field for theaccessTokenTtlrecord component.private final StringThe field for theaudiencerecord component.private final StringThe field for theclientIdrecord component.static final DurationLongest lifetime an access token of the legacy flow may have.private final StringThe field for theredirectUrirecord component.The field for thescopesrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaccessTokenTtlrecord component.audience()Returns the value of theaudiencerecord component.clientId()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.Returns the value of theredirectUrirecord component.private static voidrequireText(String value, String name) Refuses a blank text.scopes()Returns the value of thescopesrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
clientId
The field for theclientIdrecord component. -
redirectUri
The field for theredirectUrirecord component. -
scopes
The field for thescopesrecord component. -
audience
The field for theaudiencerecord component. -
accessTokenTtl
The field for theaccessTokenTtlrecord component. -
MAX_ACCESS_TOKEN_TTL
Longest lifetime an access token of the legacy flow may have.
-
-
Constructor Details
-
LegacyImplicitProperties
public LegacyImplicitProperties(@DefaultValue("legacy-implicit-spa") String clientId, String redirectUri, @DefaultValue("documents.read") List<String> scopes, @DefaultValue("resource-server") String audience, @DefaultValue("PT5M") Duration accessTokenTtl) Validates the settings and defensively copies the scopes.- Throws:
IllegalArgumentException- if the client id, redirect URI or audience is blank, the scopes are missing, empty or contain a blank value, or the lifetime is missing, not positive or longer thanMAX_ACCESS_TOKEN_TTL.
-
-
Method Details
-
requireText
Refuses a blank text.- Parameters:
value- the value.name- its name, for the message.
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
clientId
Returns the value of theclientIdrecord component.- Returns:
- the value of the
clientIdrecord component
-
redirectUri
Returns the value of theredirectUrirecord component.- Returns:
- the value of the
redirectUrirecord component
-
scopes
Returns the value of thescopesrecord component.- Returns:
- the value of the
scopesrecord component
-
audience
Returns the value of theaudiencerecord component.- Returns:
- the value of the
audiencerecord component
-
accessTokenTtl
Returns the value of theaccessTokenTtlrecord component.- Returns:
- the value of the
accessTokenTtlrecord component
-