Class NullAuthenticationProvider

java.lang.Object
com.jk.webstack.security.NullAuthenticationProvider
All Implemented Interfaces:
org.springframework.security.authentication.AuthenticationProvider

public class NullAuthenticationProvider extends Object implements org.springframework.security.authentication.AuthenticationProvider
This class is a placeholder authentication provider that always returns null during the authentication process.
Version:
1.0
Author:
Dr. Jalal H. Kiswani
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.security.core.Authentication
    authenticate(org.springframework.security.core.Authentication authentication)
    This method performs authentication and always returns null.
    boolean
    supports(Class<?> authentication)
    This method indicates whether this provider supports the specified authentication token class.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NullAuthenticationProvider

      public NullAuthenticationProvider()
  • Method Details

    • authenticate

      public org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication) throws org.springframework.security.core.AuthenticationException
      This method performs authentication and always returns null.

      This method is intentionally empty as this provider does not perform any authentication..

      Specified by:
      authenticate in interface org.springframework.security.authentication.AuthenticationProvider
      Parameters:
      authentication - Specifies the authentication request object.
      Returns:
      null.
      Throws:
      org.springframework.security.core.AuthenticationException - this exception is not thrown by this provider.
    • supports

      public boolean supports(Class<?> authentication)
      This method indicates whether this provider supports the specified authentication token class.
      Specified by:
      supports in interface org.springframework.security.authentication.AuthenticationProvider
      Parameters:
      authentication - Specifies the class of the authentication token.
      Returns:
      false.