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
Modifier and TypeClassDescriptionstatic final class
Authentication response builder.Nested classes/interfaces inherited from class io.helidon.security.SecurityResponse
SecurityResponse.SecurityStatus
-
Method Summary
Modifier and TypeMethodDescriptionstatic AuthenticationResponse
abstain()
Provider returning this response is not capable to make a decision (e.g.builder()
Get a builder for more complex responses.static AuthenticationResponse
Construct a failed response with an explanatory message.static AuthenticationResponse
Construct a failed response with a throwable as a cause.service()
Service (or client) subject.static AuthenticationResponse
Provider has authenticated the request and created a principal for a user.static AuthenticationResponse
Provider has authenticated the request and created a user Subject.static AuthenticationResponse
Provider has authenticated the request and created a user and service Subject.static AuthenticationResponse
successService
(Principal principal) Provider has authenticated the request and created a principal for a service (or a client).static AuthenticationResponse
successService
(Subject service) Provider has authenticated the request and created a service Subject.toString()
user()
User subject.Methods inherited from class io.helidon.security.SecurityResponse
description, requestHeaders, responseHeaders, status, statusCode, throwable
-
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
User subject.- Returns:
Subject
of the user, if one was authenticated
-
service
Service (or client) subject.- Returns:
Subject
of the service (or client), if one was authenticated
-
toString
- Overrides:
toString
in classSecurityResponse
-