|
spring-security-openid | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.springframework.security.openid.OpenIDAuthenticationProvider
public class OpenIDAuthenticationProvider
Finalises the OpenID authentication by obtaining local authorities for the authenticated user.
The authorities are obtained by calling the configured UserDetailsService.
The UserDetails it returns must, at minimum, contain the username and GrantedAuthority
objects applicable to the authenticated user. Note that by default, Spring Security ignores the password and
enabled/disabled status of the UserDetails because this is authentication-related and should have been
enforced by another provider server.
The UserDetails returned by implementations is stored in the generated Authentication token,
so additional properties such as email addresses, telephone numbers etc can easily be stored.
| Constructor Summary | |
|---|---|
OpenIDAuthenticationProvider()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
org.springframework.security.core.Authentication |
authenticate(org.springframework.security.core.Authentication authentication)
|
protected org.springframework.security.core.Authentication |
createSuccessfulAuthentication(org.springframework.security.core.userdetails.UserDetails userDetails,
OpenIDAuthenticationToken auth)
Handles the creation of the final Authentication object which will be returned by the provider. |
void |
setAuthenticationUserDetailsService(org.springframework.security.core.userdetails.AuthenticationUserDetailsService<OpenIDAuthenticationToken> userDetailsService)
Used to load the UserDetails for the authenticated OpenID user. |
void |
setAuthoritiesMapper(org.springframework.security.core.authority.mapping.GrantedAuthoritiesMapper authoritiesMapper)
|
void |
setUserDetailsService(org.springframework.security.core.userdetails.UserDetailsService userDetailsService)
Used to load the UserDetails for the authenticated OpenID user. |
boolean |
supports(Class<?> authentication)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OpenIDAuthenticationProvider()
| Method Detail |
|---|
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanException
public org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication)
throws org.springframework.security.core.AuthenticationException
authenticate in interface org.springframework.security.authentication.AuthenticationProviderorg.springframework.security.core.AuthenticationException
protected org.springframework.security.core.Authentication createSuccessfulAuthentication(org.springframework.security.core.userdetails.UserDetails userDetails,
OpenIDAuthenticationToken auth)
The default implementation just creates a new OpenIDAuthenticationToken from the original, but with the UserDetails as the principal and including the authorities loaded by the UserDetailsService.
userDetails - the loaded UserDetails objectauth - the token passed to the authenticate method, containing
public void setUserDetailsService(org.springframework.security.core.userdetails.UserDetailsService userDetailsService)
UserDetails for the authenticated OpenID user.
public void setAuthenticationUserDetailsService(org.springframework.security.core.userdetails.AuthenticationUserDetailsService<OpenIDAuthenticationToken> userDetailsService)
UserDetails for the authenticated OpenID user.
public boolean supports(Class<?> authentication)
supports in interface org.springframework.security.authentication.AuthenticationProviderpublic void setAuthoritiesMapper(org.springframework.security.core.authority.mapping.GrantedAuthoritiesMapper authoritiesMapper)
|
spring-security-openid | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||