Package google.registry.request.auth
Class AuthResult
java.lang.Object
google.registry.request.auth.AuthResult
Results of authentication for a given HTTP request, as emitted by an
AuthenticationMechanism
.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionService account email of the authenticated app, if there is one.abstract AuthSettings.AuthLevel
static AuthResult
static AuthResult
createUser
(UserAuthInfo userAuthInfo) boolean
abstract Optional
<UserAuthInfo> Information about the authenticated user, if there is one.
-
Field Details
-
NOT_AUTHENTICATED
No authentication was made.In the authentication step, this means that none of the configured authentication methods were able to authenticate the user. But the authorization settings may be such that it's perfectly fine not to be authenticated. The
RequestAuthenticator.authorize(google.registry.request.auth.AuthSettings, jakarta.servlet.http.HttpServletRequest)
method returns NOT_AUTHENTICATED in this case, as opposed to absent() if authentication failed and was required. So as a return from an authorization check, this can be treated as a success.
-
-
Constructor Details
-
AuthResult
public AuthResult()
-
-
Method Details
-
authLevel
-
userAuthInfo
Information about the authenticated user, if there is one. -
appServiceAccount
Service account email of the authenticated app, if there is one. -
isAuthenticated
public boolean isAuthenticated() -
userIdForLogging
-
createApp
-
createUser
-