public class ReferenceAuthorisation extends Object implements Authorisation
Authorisation.Decision| Constructor and Description |
|---|
ReferenceAuthorisation() |
| Modifier and Type | Method and Description |
|---|---|
Authorisation.Decision |
authoriseForLogin(ApplicationUser user,
javax.servlet.http.HttpServletRequest httpServletRequest)
Called to ask whether a user is authorised to perform the given request when trying to login and estblish a new
session with JIRA.
|
Authorisation.Decision |
authoriseForRole(ApplicationUser user,
javax.servlet.http.HttpServletRequest httpServletRequest,
String role)
This is called by the security layers to ask whether a user is authorised to perform the given request with the
provided role string.
|
Set<String> |
getRequiredRoles(javax.servlet.http.HttpServletRequest httpServletRequest)
This is called by the security layers to get a set of role strings that are required for this request.
|
public Authorisation.Decision authoriseForLogin(@Nonnull ApplicationUser user, javax.servlet.http.HttpServletRequest httpServletRequest)
AuthorisationAt this stage the user has been authenticated by not authorised to login.
authoriseForLogin in interface Authorisationuser - a non null user that has been authenticatedhttpServletRequest - the request in playpublic Set<String> getRequiredRoles(javax.servlet.http.HttpServletRequest httpServletRequest)
Authorisation#authoriseForRole(com.atlassian.crowd.embedded.api.User,
javax.servlet.http.HttpServletRequest, String) will be called to decide if they are in fact authorised to
execute this request.
NOTE : If you give off a role MUST answer when you are called back via #authoriseForRole(com.atlassian.crowd.embedded.api.User, javax.servlet.http.HttpServletRequest, String).
getRequiredRoles in interface AuthorisationhttpServletRequest - the request in playpublic Authorisation.Decision authoriseForRole(@Nullable ApplicationUser user, javax.servlet.http.HttpServletRequest httpServletRequest, String role)
AuthorisationYou may be called with role strings that you did not give out. In this case you should ABSTAIN from a decision.
authoriseForRole in interface Authorisationuser - a user that may be nullhttpServletRequest - the request in playCopyright © 2002-2016 Atlassian. All Rights Reserved.