Class OpenIdSecurityManager

java.lang.Object
com.gigaspaces.security.openid.OpenIdSecurityManager
All Implemented Interfaces:
SecurityManager

public class OpenIdSecurityManager extends Object implements SecurityManager
  • Field Details

  • Constructor Details

    • OpenIdSecurityManager

      public OpenIdSecurityManager()
  • Method Details

    • init

      public void init(Properties properties) throws SecurityException
      Initialize the security manager using the spring security configuration.
      Specified by:
      init in interface SecurityManager
      Parameters:
      properties - properties to use configure this instance.
      Throws:
      SecurityException
    • authenticate

      public Authentication authenticate(UserDetails userDetails) throws AuthenticationException
      Description copied from interface: SecurityManager
      Attempts to authenticate the passed user represented by UserDetails, returning a fully populated UserDetails object (including granted authorities) if successful.
      Specified by:
      authenticate in interface SecurityManager
      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 GrantedAuthorities SimpleRoleGrantedAuthority[] (implements GrantedAuthority). Example structure: [{role1, auth1}, {role1, auth2}, {role2, auth3}]
      to typed PopulatedRoleAuthority[]. Example structure: [{role1, [auth1, auth2]}, {role2, [auth3]}]
      Throws:
      Exception
    • createAuthenticationRequest

      protected org.springframework.security.core.Authentication createAuthenticationRequest(UserDetails userDetails)
      Creates an Authentication request object to be passed to the AuthenticationManager.authenticate(org.springframework.security.core.Authentication) method on each call to authenticate(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 using ConfigurableApplicationContext.close().
      Specified by:
      close in interface SecurityManager
    • createDirectoryManager

      public DirectoryManager createDirectoryManager(UserDetails userDetails) throws AuthenticationException, AccessDeniedException
      Throws a DirectoryAccessDeniedException on any attempt to manage the users/roles using this API.
      Specified by:
      createDirectoryManager in interface SecurityManager
      Parameters:
      userDetails - the user request object
      Returns:
      a directory manager instance
      Throws:
      AuthenticationException - if authentication fails for the specified user
      AccessDeniedException - if not granted sufficient access required to manage role details