| Package | Description |
|---|---|
| org.pac4j.play.java |
| Modifier and Type | Method and Description |
|---|---|
static ActionContext |
ActionContext.build(play.mvc.Http.Context ctx,
Object configuration)
Build the action context from the Play
Http.Context and the RequiresAuthentication annotation. |
| Modifier and Type | Method and Description |
|---|---|
protected play.libs.F.Promise<org.pac4j.core.profile.CommonProfile> |
RequiresAuthenticationAction.authenticate(ActionContext actionContext)
Authenticates the current request by getting the credentials and the corresponding user profile.
|
protected play.libs.F.Promise<play.mvc.Result> |
RequiresAuthenticationAction.authenticationFailure(ActionContext actionContext)
Default authentication failure strategy which generates an unauthorized page if stateless web service
or redirect to the authentication provider after saving the original url.
|
protected play.libs.F.Promise<play.mvc.Result> |
RequiresAuthenticationAction.authenticationSuccess(org.pac4j.core.profile.CommonProfile profile,
ActionContext actionContext)
Default authentication success strategy which forward to the next action if the user
has access or returns an access denied error otherwise.
|
protected boolean |
RequiresAuthenticationAction.hasAccess(org.pac4j.core.profile.CommonProfile profile,
ActionContext actionContext)
Returns true if the user defined by the profile has access to the underlying resource
depending on the requireAnyRole and requireAllRoles fields.
|
protected boolean |
RequiresAuthenticationAction.isAjaxRequest(ActionContext actionContext)
Is it a request Ajax?
|
protected boolean |
RequiresAuthenticationAction.isStateless(ActionContext actionContext)
Is it a stateless authentication flow?
|
protected String |
RequiresAuthenticationAction.retrieveOriginalUrl(ActionContext actionContext)
Retrieve the requested url from the session.
|
protected play.libs.F.Promise<org.pac4j.core.profile.CommonProfile> |
RequiresAuthenticationAction.retrieveUserProfile(ActionContext actionContext)
Retrieve user profile either by looking in the session or trying to authenticate directly
if stateless web service.
|
protected void |
RequiresAuthenticationAction.saveOriginalUrl(ActionContext actionContext)
Save the requested url in session if the request is not Ajax.
|
protected void |
RequiresAuthenticationAction.saveUserProfile(org.pac4j.core.profile.CommonProfile profile,
ActionContext actionContext)
Save the user profile in session or attach it to the request if stateless web service.
|
Copyright © 2015. All Rights Reserved.