public class SecurityUtils extends Object
| Constructor and Description |
|---|
SecurityUtils() |
| Modifier and Type | Method and Description |
|---|---|
static javax.resource.spi.security.PasswordCredential |
getPasswordCredential(javax.resource.spi.ManagedConnectionFactory mcf,
Subject subject,
javax.resource.spi.ConnectionRequestInfo info)
This method returns the
PasswordCredential object, given
the ManagedConnectionFactory, subject and the
ConnectionRequestInfo. |
static boolean |
isPasswordCredentialEqual(javax.resource.spi.security.PasswordCredential pC1,
javax.resource.spi.security.PasswordCredential pC2)
Returns true if two
PasswordCredential objects are equal; false otherwise |
public static javax.resource.spi.security.PasswordCredential getPasswordCredential(javax.resource.spi.ManagedConnectionFactory mcf,
Subject subject,
javax.resource.spi.ConnectionRequestInfo info)
throws javax.resource.ResourceException
PasswordCredential object, given
the ManagedConnectionFactory, subject and the
ConnectionRequestInfo. It first checks if the
ConnectionRequestInfo is null or not. If it is not null,
it constructs a PasswordCredential object with
the user and password fields from the ConnectionRequestInfo and returns this
PasswordCredential object. If the ConnectionRequestInfo
is null, it retrieves the PasswordCredential objects from
the Subject parameter and returns the first
PasswordCredential object which contains a
ManagedConnectionFactory, instance equivalent
to the ManagedConnectionFactory, parameter.mcf - ManagedConnectionFactorysubject - Subjectinfo - ConnectionRequestInfoPasswordCredentialResourceException - generic exception if operation failsSecurityException - if access to the Subject instance is deniedjavax.resource.ResourceExceptionpublic static boolean isPasswordCredentialEqual(javax.resource.spi.security.PasswordCredential pC1,
javax.resource.spi.security.PasswordCredential pC2)
PasswordCredential objects are equal; false otherwisepC1 - PasswordCredentialpC2 - PasswordCredentialCopyright © 2017. All rights reserved.