Class ManualAuthenticationServiceImpl

java.lang.Object
ubic.gemma.core.security.authentication.ManualAuthenticationServiceImpl
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationEventPublisherAware, ManualAuthenticationService

public class ManualAuthenticationServiceImpl extends Object implements ManualAuthenticationService, org.springframework.context.ApplicationEventPublisherAware
Process authentication requests that come from outside a web context. This is used for command line interfaces, for example.
Version:
$Id: ManualAuthenticationServiceImpl.java,v 1.5 2013/09/22 18:50:42 paul Exp $
Author:
keshav
  • Constructor Details

    • ManualAuthenticationServiceImpl

      public ManualAuthenticationServiceImpl(org.springframework.security.authentication.AuthenticationManager authenticationManager, String anonymousAuthenticationKey)
  • Method Details

    • authenticate

      public org.springframework.security.core.Authentication authenticate(String username, String password) throws org.springframework.security.core.AuthenticationException
      Description copied from interface: ManualAuthenticationService
      Authenticate using the provided username and password.
      Specified by:
      authenticate in interface ManualAuthenticationService
      Throws:
      org.springframework.security.core.AuthenticationException - if the authentication fails.
    • authenticateAnonymously

      public org.springframework.security.core.Authentication authenticateAnonymously() throws org.springframework.security.core.AuthenticationException
      Description copied from interface: ManualAuthenticationService
      Perform an anonymous authentication.
      Specified by:
      authenticateAnonymously in interface ManualAuthenticationService
      Throws:
      org.springframework.security.core.AuthenticationException - if anonymous authentication fails, likely due to a misconfiguration.
    • setApplicationEventPublisher

      public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
      Specified by:
      setApplicationEventPublisher in interface org.springframework.context.ApplicationEventPublisherAware