Package play.mvc
Class Security.Authenticator
- Object
-
- play.mvc.Results
-
- play.mvc.Security.Authenticator
-
-
Constructor Summary
Constructors Constructor Description Authenticator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<String>
getUsername(Http.Request req)
Retrieves the username from the HTTP request; the default is to read from the session cookie.Result
onUnauthorized(Http.Request req)
Generates an alternative result if the user is not authenticated; the default a simple '401 Not Authorized' page.-
Methods inherited from class play.mvc.Results
badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, contentDispositionHeader, created, created, created, created, created, created, created, created, created, created, created, created, created, created, created, created, created, created, created, created, created, created, created, created, created, created, created, created, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, found, found, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, movedPermanently, movedPermanently, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, noContent, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, permanentRedirect, permanentRedirect, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, redirect, redirect, redirect, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, seeOther, seeOther, status, status, status, status, status, status, status, status, status, status, status, status, status, status, status, status, status, status, status, status, status, status, status, status, status, status, status, status, status, temporaryRedirect, temporaryRedirect, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType
-
-
-
-
Method Detail
-
getUsername
public Optional<String> getUsername(Http.Request req)
Retrieves the username from the HTTP request; the default is to read from the session cookie.- Parameters:
req
- the current request- Returns:
- the username if the user is authenticated.
-
onUnauthorized
public Result onUnauthorized(Http.Request req)
Generates an alternative result if the user is not authenticated; the default a simple '401 Not Authorized' page.- Parameters:
req
- the current request- Returns:
- a
401 Not Authorized
result
-
-