com.atlassian.seraph.auth
Class SimpleAbstractRoleMapper

java.lang.Object
  extended by com.atlassian.seraph.auth.SimpleAbstractRoleMapper
All Implemented Interfaces:
RoleMapper, Initable
Direct Known Subclasses:
GroupRoleMapper

public abstract class SimpleAbstractRoleMapper
extends java.lang.Object
implements RoleMapper

Provides a simple base implementation of RoleMapper.

It takes no initialisation parameters, and assumes all users that exist can log in.

This abstract class is a replacement for people that were previously extending the "GroupRoleMapper".

Since:
v2.4.0

Constructor Summary
SimpleAbstractRoleMapper()
           
 
Method Summary
 boolean canLogin(java.security.Principal user, javax.servlet.http.HttpServletRequest request)
          In the SimpleAbstractRoleMapper implementation, Users can login if they exist.
 void init(java.util.Map<java.lang.String,java.lang.String> params, SecurityConfig config)
          Initialise the configuration object with the given "init-params".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.seraph.auth.RoleMapper
hasRole
 

Constructor Detail

SimpleAbstractRoleMapper

public SimpleAbstractRoleMapper()
Method Detail

init

public void init(java.util.Map<java.lang.String,java.lang.String> params,
                 SecurityConfig config)
Description copied from interface: Initable
Initialise the configuration object with the given "init-params".

Specified by:
init in interface Initable
Parameters:
params - The map of "init-params" extracted from the Seraph config file. This is guaranteed not null.
config - The Seraph SecurityConfig class that is initialising the config objects. This object will only be partially initialised at this time.

canLogin

public boolean canLogin(java.security.Principal user,
                        javax.servlet.http.HttpServletRequest request)
In the SimpleAbstractRoleMapper implementation, Users can login if they exist.

Specified by:
canLogin in interface RoleMapper


Copyright © 2012 Atlassian. All Rights Reserved.