Record Class GenericTokenErrorResponse
java.lang.Object
java.lang.Record
io.micronaut.security.oauth2.endpoint.token.response.GenericTokenErrorResponse
- Record Components:
error- The error codeerrorDescription- The error descriptionerrorUri- The error uri
@Internal
@Introspected
public record GenericTokenErrorResponse(@NonNull String error, @Nullable String errorDescription, @Nullable String errorUri)
extends Record
Represents the response of an authorization server to an invalid access token request, with the error code as a
string. Unlike
TokenErrorResponse, whose error is the TokenError enum of the codes RFC 6749
section 5.2 defines, it also carries the error codes providers add to those of the specification.
The error description is free text written by the provider. Log the error code, not the whole record.
Internal: it only serves ThrowableAuthenticationResponseAdapter to read the error code of a rejected
password grant. TokenErrorResponse remains the public representation of a token error response.
- Since:
- 5.5.2
- Author:
- Sergio del Amo
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGenericTokenErrorResponse(@NonNull String error, @Nullable String errorDescription, @Nullable String errorUri) Creates an instance of aGenericTokenErrorResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@NonNull Stringerror()Returns the value of theerrorrecord component.@Nullable StringReturns the value of theerrorDescriptionrecord component.@Nullable StringerrorUri()Returns the value of theerrorUrirecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GenericTokenErrorResponse
public GenericTokenErrorResponse(@NonNull String error, @Nullable String errorDescription, @Nullable String errorUri) Creates an instance of aGenericTokenErrorResponserecord class.- Parameters:
error- the value for theerrorrecord componenterrorDescription- the value for theerrorDescriptionrecord componenterrorUri- the value for theerrorUrirecord component
-
-
Method Details
-
toString
-
hashCode
-
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). -
error
-
errorDescription
Returns the value of theerrorDescriptionrecord component.- Returns:
- the value of the
errorDescriptionrecord component
-
errorUri
-