Class CasRestAuthenticator
java.lang.Object
org.jenkinsci.plugins.cas.spring.security.CasRestAuthenticator
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
,org.springframework.security.authentication.AuthenticationManager
public final class CasRestAuthenticator
extends Object
implements org.springframework.beans.factory.InitializingBean, org.springframework.security.authentication.AuthenticationManager
Authenticator to handle the CAS REST protocol. The authenticator is mainly to handle username and password based
API requests.
- Author:
- Sebastian Sdorra, Fabien Crespel
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
org.springframework.security.core.Authentication
authenticate
(String username, String password) org.springframework.security.core.Authentication
authenticate
(org.springframework.security.authentication.UsernamePasswordAuthenticationToken token) org.springframework.security.core.Authentication
authenticate
(org.springframework.security.core.Authentication authentication) org.springframework.security.authentication.AuthenticationDetailsSource<jakarta.servlet.http.HttpServletRequest,
org.springframework.security.cas.authentication.ServiceAuthenticationDetails> org.springframework.security.authentication.AuthenticationManager
void
setAuthenticationDetailsSource
(org.springframework.security.authentication.AuthenticationDetailsSource<jakarta.servlet.http.HttpServletRequest, org.springframework.security.cas.authentication.ServiceAuthenticationDetails> authenticationDetailsSource) void
setAuthenticationManager
(org.springframework.security.authentication.AuthenticationManager authenticationManager) void
setCasServerUrl
(String casServerUrl)
-
Constructor Details
-
CasRestAuthenticator
public CasRestAuthenticator()
-
-
Method Details
-
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
-
getCasServerUrl
-
setCasServerUrl
-
getAuthenticationManager
public org.springframework.security.authentication.AuthenticationManager getAuthenticationManager() -
setAuthenticationManager
public void setAuthenticationManager(org.springframework.security.authentication.AuthenticationManager authenticationManager) -
getAuthenticationDetailsSource
public org.springframework.security.authentication.AuthenticationDetailsSource<jakarta.servlet.http.HttpServletRequest,org.springframework.security.cas.authentication.ServiceAuthenticationDetails> getAuthenticationDetailsSource() -
setAuthenticationDetailsSource
public void setAuthenticationDetailsSource(org.springframework.security.authentication.AuthenticationDetailsSource<jakarta.servlet.http.HttpServletRequest, org.springframework.security.cas.authentication.ServiceAuthenticationDetails> authenticationDetailsSource) -
authenticate
public org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication) throws org.springframework.security.core.AuthenticationException - Specified by:
authenticate
in interfaceorg.springframework.security.authentication.AuthenticationManager
- Throws:
org.springframework.security.core.AuthenticationException
-
authenticate
public org.springframework.security.core.Authentication authenticate(org.springframework.security.authentication.UsernamePasswordAuthenticationToken token) -
authenticate
public org.springframework.security.core.Authentication authenticate(String username, String password) throws org.springframework.security.core.AuthenticationException - Throws:
org.springframework.security.core.AuthenticationException
-