play.mvc
Class Security.Authenticator

java.lang.Object
  extended by play.mvc.Results
      extended by play.mvc.Security.Authenticator
Enclosing class:
Security

public static class Security.Authenticator
extends Results

Handles authentication.


Nested Class Summary
 
Nested classes/interfaces inherited from class play.mvc.Results
Results.AsyncResult, Results.ByteChunks, Results.Chunks<A>, Results.Redirect, Results.Status, Results.StringChunks, Results.Todo
 
Field Summary
 
Fields inherited from class play.mvc.Results
TODO
 
Constructor Summary
Security.Authenticator()
           
 
Method Summary
 java.lang.String getUsername(Http.Context ctx)
          Retrieves the username from the HTTP context; the default is to read from the session cookie.
 Result onUnauthorized(Http.Context ctx)
          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
async, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, 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, found, found, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, movedPermanently, movedPermanently, noContent, 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, redirect, redirect, seeOther, seeOther, status, status, status, status, status, status, status, status, status, status, status, status, status, temporaryRedirect, temporaryRedirect, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Security.Authenticator

public Security.Authenticator()
Method Detail

getUsername

public java.lang.String getUsername(Http.Context ctx)
Retrieves the username from the HTTP context; the default is to read from the session cookie.

Returns:
null if the user is not authenticated.

onUnauthorized

public Result onUnauthorized(Http.Context ctx)
Generates an alternative result if the user is not authenticated; the default a simple '401 Not Authorized' page.