Search in sources :

Example 6 with ClientSecurityContext

use of com.sun.enterprise.security.common.ClientSecurityContext in project Payara by payara.

the class J2EEKeyManager method setClientSecurityContext.

/**
 * Sets the security context on the appclient side.
 * It sets the relevant information into the TLS
 * @param String username is the user who authenticated
 * @param Subject is the subject representation of the user
 * @param Credentials the credentials that the server associated with it
 */
private static void setClientSecurityContext(String username, Subject subject) {
    ClientSecurityContext securityContext = new ClientSecurityContext(username, subject);
    ClientSecurityContext.setCurrent(securityContext);
}
Also used : ClientSecurityContext(com.sun.enterprise.security.common.ClientSecurityContext)

Aggregations

ClientSecurityContext (com.sun.enterprise.security.common.ClientSecurityContext)6 Subject (javax.security.auth.Subject)4 Iterator (java.util.Iterator)2 SecurityContext (com.sun.enterprise.common.iiop.security.SecurityContext)1 SecurityContext (com.sun.enterprise.security.SecurityContext)1 LoginException (com.sun.enterprise.security.auth.login.common.LoginException)1 PasswordCredential (com.sun.enterprise.security.auth.login.common.PasswordCredential)1 X509CertificateCredential (com.sun.enterprise.security.auth.login.common.X509CertificateCredential)1 SOAPAuthParam (com.sun.enterprise.security.jmac.provider.SOAPAuthParam)1 PasswordAuthentication (java.net.PasswordAuthentication)1 HashSet (java.util.HashSet)1 Set (java.util.Set)1