|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@PublicSpi public interface Authorisation
Implementations of this interface can indicate whether a user is authorised to perform a given request.
They WILL be called for every request so you should make sure your authoriation check is somewhat performant.
Nested Class Summary | |
---|---|
static class |
Authorisation.Decision
When deciding whether to authorise a request, you can either grant it, deny or abstain from a decision |
Method Summary | |
---|---|
Authorisation.Decision |
authoriseForLogin(com.atlassian.crowd.embedded.api.User 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(com.atlassian.crowd.embedded.api.User 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. |
Method Detail |
---|
Authorisation.Decision authoriseForLogin(@Nonnull com.atlassian.crowd.embedded.api.User user, javax.servlet.http.HttpServletRequest httpServletRequest)
user
- a non null user that has been authenticatedhttpServletRequest
- the request in play
Set<String> getRequiredRoles(javax.servlet.http.HttpServletRequest httpServletRequest)
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)
.
httpServletRequest
- the request in play
Authorisation.Decision authoriseForRole(@Nullable com.atlassian.crowd.embedded.api.User user, javax.servlet.http.HttpServletRequest httpServletRequest, String role)
user
- a user that may be nullhttpServletRequest
- the request in play
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |