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

io.polyglotted.spring.security.DefaultAuthProvider Maven / Gradle / Ivy

There is a newer version: 5.0.7.2
Show newest version
package io.polyglotted.spring.security;

import org.springframework.security.authentication.AuthenticationProvider;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException;
import org.springframework.stereotype.Component;

import static io.polyglotted.common.util.ReflectionUtil.isAssignable;

@Component
public class DefaultAuthProvider implements AuthenticationProvider {
    @Override public Authentication authenticate(Authentication authentication) throws AuthenticationException { return authentication; }

    @Override public boolean supports(Class authentication) { return isAssignable(DefaultAuthToken.class, authentication); }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy