Class AuthenticationResponse
java.lang.Object
io.helidon.security.SecurityResponse
io.helidon.security.AuthenticationResponse
Response as returned from an authentication provider. Provider should return a response even for failed authentications.
Only throw an exception if an error has occurred (e.g. misconfiguration). Do not throw exception
for bad credentials...
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classAuthentication response builder.Nested classes/interfaces inherited from class SecurityResponse
SecurityResponse.SecurityStatusModifier and TypeClassDescriptionstatic enumStatus of a security operation. -
Method Summary
Modifier and TypeMethodDescriptionstatic AuthenticationResponseabstain()Provider returning this response is not capable to make a decision (e.g.builder()Get a builder for more complex responses.static AuthenticationResponseConstruct a failed response with an explanatory message.static AuthenticationResponseConstruct a failed response with a throwable as a cause.service()Service (or client) subject.static AuthenticationResponseProvider has authenticated the request and created a principal for a user.static AuthenticationResponseProvider has authenticated the request and created a user Subject.static AuthenticationResponseProvider has authenticated the request and created a user and service Subject.static AuthenticationResponsesuccessService(Principal principal) Provider has authenticated the request and created a principal for a service (or a client).static AuthenticationResponsesuccessService(Subject service) Provider has authenticated the request and created a service Subject.toString()user()User subject.Methods inherited from class SecurityResponse
description, requestHeaders, responseHeaders, status, statusCode, throwableModifier and TypeMethodDescriptionDescription of current security status.Get new request headers to be used.Get new response headers to be used.status()Status of this response.Status code (uses HTTP status codes for mapping).Get underlying throwable causing a failure state (if such happened).
-
Method Details
-
builder
Get a builder for more complex responses.- Returns:
- Builder instance
-
failed
Construct a failed response with a throwable as a cause.- Parameters:
message- Descriptive message of what happened. This message is propagated to public API!cause- Throwable causing the failed authentication. This will be logged. It may reach user only in case of debug.- Returns:
- AuthenticationResponse with information filled
-
failed
Construct a failed response with an explanatory message.- Parameters:
message- Descriptive message of what happened. This message is propagated to public API!- Returns:
- AuthenticationResponse with information filled
-
abstain
Provider returning this response is not capable to make a decision (e.g. the user format is not supported).- Returns:
- AuthenticationResponse with information filled
-
success
Provider has authenticated the request and created a user Subject.- Parameters:
subject- Subject of the current user- Returns:
- AuthenticationResponse with information filled
-
success
Provider has authenticated the request and created a user and service Subject.- Parameters:
user- Subject of the current userservice- Subject of the current service- Returns:
- AuthenticationResponse with information filled
-
successService
Provider has authenticated the request and created a service Subject.- Parameters:
service- Subject of requesting service (or client)- Returns:
- AuthenticationResponse with information filled
-
success
Provider has authenticated the request and created a principal for a user.- Parameters:
principal- principal of the user- Returns:
- AuthenticationResponse with information filled
- See Also:
-
successService
Provider has authenticated the request and created a principal for a service (or a client).- Parameters:
principal- principal of the service- Returns:
- AuthenticationResponse with information filled
- See Also:
-
user
-
service
-
toString
- Overrides:
toStringin classSecurityResponse
-