Class SamlPrincipal
java.lang.Object
org.apache.catalina.realm.GenericPrincipal
org.exoplatform.addons.saml.extensions.SamlPrincipal
- All Implemented Interfaces:
Serializable, Principal, org.apache.catalina.TomcatPrincipal
public class SamlPrincipal
extends org.apache.catalina.realm.GenericPrincipal
The principal of a user authenticated through the SAML workflow.
Tomcat's single sign-on valve keeps the principal of a login and gives it
back to the next portal session of the same browser. The marker in the
portal session is lost with that session, so the type of the principal is
what still tells a SAML login when the valve signs the user back in. See
SamlServiceProviderAuthenticator and
HybridSAML2LogoutFilter.isSamlSession(HttpServletRequest).
The name is the eXo username, after the mapping of the valve (e-mail to username, lower case). The subject is what the IDP sent: the SAML logout asks the IDP to end the session of that subject, not of the eXo username.
- See Also:
-
Field Summary
Fields inherited from class org.apache.catalina.realm.GenericPrincipal
attributes, gssCredential, loginContext, name, roles, userPrincipal -
Constructor Summary
ConstructorsConstructorDescriptionSamlPrincipal(String name, List<String> roles) SamlPrincipal(String name, List<String> roles, String subject) -
Method Summary
Methods inherited from class org.apache.catalina.realm.GenericPrincipal
equals, getAttribute, getAttributeNames, getGssCredential, getName, getRoles, getUserPrincipal, hashCode, hasRole, logout, setGssCredential, toString
-
Constructor Details
-
SamlPrincipal
-
SamlPrincipal
-
-
Method Details
-
getSubject
- Returns:
- the subject sent by the IDP (the NameID, or the value of the subject attribute), or the name when it is not known
-