public final class SecurityContextFactory extends Object
ExecutionContext.SecurityContext for all known AuthnType| Constructor and Description |
|---|
SecurityContextFactory() |
| Modifier and Type | Method and Description |
|---|---|
static com.vmware.vapi.core.ExecutionContext.SecurityContext |
createDefaultSecurityContext(Map<String,Object> props)
Creates security context using the provided map of properties
|
static com.vmware.vapi.core.ExecutionContext.SecurityContext |
createOAuthSecurityContext(char[] accessToken)
Creates a security context based on OAuth2 access token
|
static com.vmware.vapi.core.ExecutionContext.SecurityContext |
createSamlSecurityContext(com.vmware.vapi.saml.SamlToken token,
PrivateKey privateKey)
Creates a SAML token security context
|
static com.vmware.vapi.core.ExecutionContext.SecurityContext |
createSessionSecurityContext(char[] sessionId)
Creates a security context which represents and attempt to reuse
an existing session.
|
static com.vmware.vapi.core.ExecutionContext.SecurityContext |
createUserPassSecurityContext(String user,
char[] password)
Creates a security context suitable for user/pass authentication.
|
static com.vmware.vapi.security.OAuthSecurityContext |
parseOAuthSecurityContext(com.vmware.vapi.core.ExecutionContext.SecurityContext ctx)
Parses the
ExecutionContext.SecurityContext looking for oauth information. |
static SamlAuthenticationData |
parseSamlSecurityContext(com.vmware.vapi.core.ExecutionContext.SecurityContext ctx)
Parses a given
ExecutionContext.SecurityContext into a more convenient for use
structure |
static com.vmware.vapi.security.SessionSecurityContext |
parseSessionSecurityContext(com.vmware.vapi.core.ExecutionContext.SecurityContext ctx)
Parses the
ExecutionContext.SecurityContext looking for session information. |
static com.vmware.vapi.security.UserPassSecurityContext |
parseUserPassSecurityContext(com.vmware.vapi.core.ExecutionContext.SecurityContext ctx)
Parses a
ExecutionContext.SecurityContext into a UserPassSecurityContext
if all needed data is there, otherwise null will be returned. |
public static com.vmware.vapi.core.ExecutionContext.SecurityContext createSamlSecurityContext(com.vmware.vapi.saml.SamlToken token,
PrivateKey privateKey)
token - the token that should be used for authenticationprivateKey - the private key that should be used to sign the requestpublic static com.vmware.vapi.core.ExecutionContext.SecurityContext createSessionSecurityContext(char[] sessionId)
sessionId - String representing a session IDpublic static com.vmware.vapi.core.ExecutionContext.SecurityContext createOAuthSecurityContext(char[] accessToken)
accessToken - access token that should be used for authenticationpublic static com.vmware.vapi.core.ExecutionContext.SecurityContext createUserPassSecurityContext(String user, char[] password)
user - the username of the principal. cannot be null.password - the password of the principal. cannot be null.public static com.vmware.vapi.security.UserPassSecurityContext parseUserPassSecurityContext(com.vmware.vapi.core.ExecutionContext.SecurityContext ctx)
ExecutionContext.SecurityContext into a UserPassSecurityContext
if all needed data is there, otherwise null will be returned.ctx - cannot be nullpublic static SamlAuthenticationData parseSamlSecurityContext(com.vmware.vapi.core.ExecutionContext.SecurityContext ctx)
ExecutionContext.SecurityContext into a more convenient for use
structurectx - the security context that will be parsed. Cannot be null.
Authentication type should be AuthnType.SAMLpublic static com.vmware.vapi.security.SessionSecurityContext parseSessionSecurityContext(com.vmware.vapi.core.ExecutionContext.SecurityContext ctx)
ExecutionContext.SecurityContext looking for session information.ctx - SessionSecurityContext if session is found,
null otherwisepublic static com.vmware.vapi.security.OAuthSecurityContext parseOAuthSecurityContext(com.vmware.vapi.core.ExecutionContext.SecurityContext ctx)
ExecutionContext.SecurityContext looking for oauth information.ctx - OAuthSecurityContext if access token is found,
null otherwisepublic static com.vmware.vapi.core.ExecutionContext.SecurityContext createDefaultSecurityContext(Map<String,Object> props)
props - contains the security context properties. can be
nullExecutionContext.SecurityContext containing the properties passed as
parameter. must not be nullCopyright © 2016. All rights reserved.