Package com.gigaspaces.security.openid
Class OpenIdSecurityManager
java.lang.Object
com.gigaspaces.security.openid.OpenIdSecurityManager
- All Implemented Interfaces:
SecurityManager
-
Field Summary
FieldsFields inherited from interface com.gigaspaces.security.SecurityManager
SECURITY_MANAGER_CLASS_PROPERTY_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthenticate(UserDetails userDetails) Attempts to authenticate the passed user represented byUserDetails, returning a fully populatedUserDetailsobject (including granted authorities) if successful.protected PopulatedRoleAuthority[]buildUserAuthorities(Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) Creates Complex Authority List from GrantedAuthoritiesSimpleRoleGrantedAuthority[] (implementsGrantedAuthority).voidclose()Closes the Spring application context usingConfigurableApplicationContext.close().protected org.springframework.security.core.AuthenticationcreateAuthenticationRequest(UserDetails userDetails) Creates anAuthenticationrequest object to be passed to theAuthenticationManager.authenticate(org.springframework.security.core.Authentication)method on each call toauthenticate(UserDetails).createDirectoryManager(UserDetails userDetails) Throws aDirectoryAccessDeniedExceptionon any attempt to manage the users/roles using this API.voidinit(Properties properties) Initialize the security manager using the spring security configuration.
-
Field Details
-
SPRING_SECURITY_CONFIG_LOCATION
- See Also:
-
XAP_SECURITY_ACTIVE_CONFIG
- See Also:
-
XAP_SECURITY_ROLES
- See Also:
-
-
Constructor Details
-
OpenIdSecurityManager
public OpenIdSecurityManager()
-
-
Method Details
-
init
Initialize the security manager using the spring security configuration.- Specified by:
initin interfaceSecurityManager- Parameters:
properties- properties to use configure this instance.- Throws:
SecurityException
-
authenticate
Description copied from interface:SecurityManagerAttempts to authenticate the passed user represented byUserDetails, returning a fully populatedUserDetailsobject (including granted authorities) if successful.- Specified by:
authenticatein interfaceSecurityManager- Parameters:
userDetails- the user request object- Returns:
- a fully authenticated object including authorities
- Throws:
AuthenticationException- if authentication fails
-
buildUserAuthorities
protected PopulatedRoleAuthority[] buildUserAuthorities(Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) throws Exception Creates Complex Authority List from GrantedAuthoritiesSimpleRoleGrantedAuthority[] (implementsGrantedAuthority). Example structure: [{role1, auth1}, {role1, auth2}, {role2, auth3}]
to typedPopulatedRoleAuthority[]. Example structure: [{role1, [auth1, auth2]}, {role2, [auth3]}]- Throws:
Exception
-
createAuthenticationRequest
protected org.springframework.security.core.Authentication createAuthenticationRequest(UserDetails userDetails) Creates anAuthenticationrequest object to be passed to theAuthenticationManager.authenticate(org.springframework.security.core.Authentication)method on each call toauthenticate(UserDetails).This method can be overridden by subclasses which require authentication request other than the default
UsernamePasswordAuthenticationToken.- Parameters:
userDetails- The GigaSpaces user details request object- Returns:
- an authentication request object
-
close
public void close()Closes the Spring application context usingConfigurableApplicationContext.close().- Specified by:
closein interfaceSecurityManager
-
createDirectoryManager
public DirectoryManager createDirectoryManager(UserDetails userDetails) throws AuthenticationException, AccessDeniedException Throws aDirectoryAccessDeniedExceptionon any attempt to manage the users/roles using this API.- Specified by:
createDirectoryManagerin interfaceSecurityManager- Parameters:
userDetails- the user request object- Returns:
- a directory manager instance
- Throws:
AuthenticationException- if authentication fails for the specified userAccessDeniedException- if not granted sufficient access required to manage role detailsDirectoryAccessDeniedException- if the directory should not be managed by API.
-