/************************************************************************* * * * CESeCore: CE Security Core * * * * This software is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or any later version. * * * * See terms of license at gnu.org. * * * *************************************************************************/ package org.cesecore.authentication.tokens; import java.io.Serializable; import java.security.Principal; import java.util.Set; /** * This class represents a Subject for the purpose of authentication/authorization. javax.security.auth.Subject was not implemented due to being * overly coupled with the JAAS paradigm. In order to avoid confusion with the End Entity concept, the word 'user' is avoided in both contexts. * * TODO: Make proper hashcode/compare methods. * * @version $Id: AuthenticationSubject.java 18305 2013-12-16 13:59:56Z anatom $ * */ public class AuthenticationSubject implements Serializable { private static final long serialVersionUID = 793575035911984396L; protected final Set principals; protected final Set credentials; public AuthenticationSubject(Set principals, Set credentials) { this.principals = principals; this.credentials = credentials; } public Set getPrincipals() { return principals; } public Set getCredentials() { return credentials; } }