com.github.ulisesbocchio.spring.boot.security.saml.user.SimpleSAMLUserDetailsService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-boot-security-saml Show documentation
Show all versions of spring-boot-security-saml Show documentation
Eases Integration between Spring Boot and spring-security-saml through properties and adapters
package com.github.ulisesbocchio.spring.boot.security.saml.user;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.security.saml.SAMLCredential;
import org.springframework.security.saml.userdetails.SAMLUserDetailsService;
/**
* Simple pass through User Details Service.
* Consider implementing your own {@link UserDetailsService} to check user permissions against a persistent storage and
* load your own {@link UserDetails} implementation.
*
* @author Ulises Bocchio
*/
public class SimpleSAMLUserDetailsService implements SAMLUserDetailsService {
@Override
public Object loadUserBySAML(SAMLCredential credential) throws UsernameNotFoundException {
return new SAMLUserDetails(credential);
}
}