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

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

package io.polyglotted.spring.security;

import io.polyglotted.common.model.Subject;
import lombok.Getter;
import org.springframework.security.authentication.AbstractAuthenticationToken;
import org.springframework.security.core.GrantedAuthority;

import java.util.Collection;

public class DefaultAuthToken extends AbstractAuthenticationToken {
    @Getter private final Object principal;
    @Getter private final Object credentials;

    public DefaultAuthToken(Subject subject, String credentials, Collection authorities) {
        super(authorities); super.setAuthenticated(true); this.principal = subject; this.credentials = credentials;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy