Class SIPAuthenticationProvider<T extends SIPAuthenticationToken<T>>

java.lang.Object
de.ikor.sip.foundation.security.authentication.SIPAuthenticationProvider<T>
Type Parameters:
T - the type of SIPAuthenticationToken handled by this authentication provider
All Implemented Interfaces:
org.springframework.security.authentication.AuthenticationProvider
Direct Known Subclasses:
SIPBasicAuthAuthenticationProvider, SIPX509AuthenticationProvider

public abstract class SIPAuthenticationProvider<T extends SIPAuthenticationToken<T>> extends Object implements org.springframework.security.authentication.AuthenticationProvider
Base class for sip authentication providers.
Author:
thomas.stieglmaier
  • Field Details

  • Constructor Details

    • SIPAuthenticationProvider

      public SIPAuthenticationProvider()
  • Method Details

    • validateAuthentication

      protected T validateAuthentication(T authentication)
      The authentication method to be implmented by sip authentication providers. By default it just calls the token validator, and if the token is valid, the same token is returned with the isAuthenticated flag set to true. Otherwise the token from the argument is returned as it was.

      If necessary this method can be overridden to provide a more sophisticated validation logic.

      Parameters:
      authentication - the token which should be checked for proper authentication
      Returns:
      a token which is either authenticated or not (can be the same as the input)
    • authenticate

      public final org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication) throws org.springframework.security.core.AuthenticationException
      Specified by:
      authenticate in interface org.springframework.security.authentication.AuthenticationProvider
      Throws:
      org.springframework.security.core.AuthenticationException
    • supports

      public final boolean supports(Class<?> authentication)
      Specified by:
      supports in interface org.springframework.security.authentication.AuthenticationProvider