ISE-ComProg-After-Midterm/screwdriver-3.5.6/box/snippets/java/DomainUsernamePasswordAuthe...

35 lines
998 B
Java
Raw Permalink Normal View History

2020-10-29 09:38:56 +00:00
package +zoccolo+.web.authentication;
import java.util.Collection;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.GrantedAuthority;
import +jpapath+.+tabella+;
public final class DomainUsernamePasswordAuthenticationToken
extends UsernamePasswordAuthenticationToken {
private final String domain;
public DomainUsernamePasswordAuthenticationToken(String principal, String credentials, String domain) {
super(principal, credentials);
this.domain = domain;
}
public DomainUsernamePasswordAuthenticationToken(+tabella+ principal, String credentials, String domain,
Collection<? extends GrantedAuthority> authorities) {
super(principal, credentials, authorities);
this.domain = domain;
}
public String getDomain() {
return domain;
}
private static final long serialVersionUID = -5138870746127783L;
/* screwdriver_knife */
}