All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.ulisesbocchio.spring.boot.security.saml.user.SimpleSAMLUserDetailsService Maven / Gradle / Ivy

Go to download

Eases Integration between Spring Boot and spring-security-saml through properties and adapters

The newest version!
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);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy