com.atlassian.security.auth.trustedapps.seraph.filter
Class SeraphAuthenticationController

java.lang.Object
  extended bycom.atlassian.security.auth.trustedapps.seraph.filter.SeraphAuthenticationController
All Implemented Interfaces:
AuthenticationController

public class SeraphAuthenticationController
extends java.lang.Object
implements AuthenticationController

Implementation of theh AuthenticationController to integrate with Atlassian Seraph.


Constructor Summary
SeraphAuthenticationController(com.atlassian.seraph.auth.RoleMapper roleMapper)
           
 
Method Summary
 boolean canLogin(java.security.Principal principal, javax.servlet.http.HttpServletRequest request)
          Checks the RoleMapper on whether or not the principal can login.
 boolean shouldAttemptAuthentication(javax.servlet.http.HttpServletRequest request)
          Checks the request attibutes for the BaseLoginFilter.OS_AUTHSTATUS_KEY.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SeraphAuthenticationController

public SeraphAuthenticationController(com.atlassian.seraph.auth.RoleMapper roleMapper)
Parameters:
roleMapper - the configured Seraph RoleMapper for the application.
Throws:
java.lang.IllegalArgumentException - if the roleMapper is null.
Method Detail

canLogin

public boolean canLogin(java.security.Principal principal,
                        javax.servlet.http.HttpServletRequest request)
Checks the RoleMapper on whether or not the principal can login.

Specified by:
canLogin in interface AuthenticationController
Parameters:
principal - the identified principal
request - the current HttpServletRequest
Returns:
true if the principal is allowed to login for the given request, false otherwise.
See Also:
AuthenticationController.canLogin(Principal, HttpServletRequest)

shouldAttemptAuthentication

public boolean shouldAttemptAuthentication(javax.servlet.http.HttpServletRequest request)
Checks the request attibutes for the BaseLoginFilter.OS_AUTHSTATUS_KEY. Will return true if the key is not present.

Specified by:
shouldAttemptAuthentication in interface AuthenticationController
Parameters:
request - the current HttpServletRequest
Returns:
true if Trusted Apps authentication should be tried, false otherwise.


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.