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 Summary
ConstructorsConstructorDescriptionManualAuthenticationServiceImpl(org.springframework.security.authentication.AuthenticationManager authenticationManager, String anonymousAuthenticationKey) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.Authenticationauthenticate(String username, String password) Authenticate using the provided username and password.org.springframework.security.core.AuthenticationPerform an anonymous authentication.voidsetApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
-
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:ManualAuthenticationServiceAuthenticate using the provided username and password.- Specified by:
authenticatein interfaceManualAuthenticationService- Throws:
org.springframework.security.core.AuthenticationException- if the authentication fails.
-
authenticateAnonymously
public org.springframework.security.core.Authentication authenticateAnonymously() throws org.springframework.security.core.AuthenticationExceptionDescription copied from interface:ManualAuthenticationServicePerform an anonymous authentication.- Specified by:
authenticateAnonymouslyin interfaceManualAuthenticationService- 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:
setApplicationEventPublisherin interfaceorg.springframework.context.ApplicationEventPublisherAware
-