|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.jguard.ext.util.SubjectUtils
public class SubjectUtils
utility class to query against subject credentials.
| Constructor Summary | |
|---|---|
SubjectUtils()
|
|
| Method Summary | |
|---|---|
static void |
addCredentialValue(javax.security.auth.Subject subject,
boolean publicVisibility,
java.lang.String credentialId,
java.lang.Object credentialValue)
adds new credential value if it does not already exist. |
static java.lang.String |
getCredentialValueAsString(javax.security.auth.Subject subject,
boolean publicVisibility,
java.lang.String credentialId)
return credential value from the specified credential set This function assume that credential have only one value return empty string if it is not found |
static java.util.Collection |
getCredentialValues(javax.security.auth.Subject subject,
boolean publicVisibility,
java.lang.String credentialId)
return credential values from the specified credential set which are mapped to the specified credentialId. |
static java.util.Collection |
getCredentialValues(javax.security.auth.Subject subject,
java.lang.String credentialId)
return credential values from private and public credential set which are mapped to the specified credentialId. |
static java.util.Set |
getEnabledPrincipals(java.util.Set userPrincipals)
|
static net.sf.jguard.core.authentication.credentials.JGuardCredential |
getIdentityCredential(javax.security.auth.Subject subject,
net.sf.jguard.core.authentication.manager.AuthenticationManager authenticationManager)
return the {link JGuardCredential identifying uniquely the user. |
static java.util.Set |
getJavaxSecuritySubjects(java.util.Set jguardSubjects)
|
static net.sf.jguard.core.organization.Organization |
getOrganization(javax.security.auth.Subject subject)
|
static javax.security.auth.Subject |
getSubject()
grab the authenticated PersistedSubject in the execution stack. |
static void |
removeCredentialValue(javax.security.auth.Subject subject,
boolean publicVisibility,
java.lang.String credentialId,
java.lang.Object credentialValue)
remove credential value if it already exists. |
static void |
setCredentialValue(javax.security.auth.Subject subject,
boolean publicVisibility,
java.lang.String credentialId,
java.lang.Object credentialValue,
boolean isIdentity)
Set credential's value, this method assume that credential have only one value If credentialId exists then the value is replaced, else the credential is created |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SubjectUtils()
| Method Detail |
|---|
public static java.util.Collection getCredentialValues(javax.security.auth.Subject subject,
java.lang.String credentialId)
subject - credentialId -
public static java.util.Collection getCredentialValues(javax.security.auth.Subject subject,
boolean publicVisibility,
java.lang.String credentialId)
subject - publicVisibility - true for publicCredentials, false for
private credentials.credentialId -
public static net.sf.jguard.core.organization.Organization getOrganization(javax.security.auth.Subject subject)
public static java.lang.String getCredentialValueAsString(javax.security.auth.Subject subject,
boolean publicVisibility,
java.lang.String credentialId)
subject - publicVisibility - true for publicCredentials, false for
private credentials.credentialId -
public static void setCredentialValue(javax.security.auth.Subject subject,
boolean publicVisibility,
java.lang.String credentialId,
java.lang.Object credentialValue,
boolean isIdentity)
subject - publicVisibility - true for publicCredentials, false for
private credentials.credentialId - credentialValue - isIdentity - true for identity credential, false otherwise
public static void addCredentialValue(javax.security.auth.Subject subject,
boolean publicVisibility,
java.lang.String credentialId,
java.lang.Object credentialValue)
subject - publicVisibility - credentialId - credentialValue -
public static net.sf.jguard.core.authentication.credentials.JGuardCredential getIdentityCredential(javax.security.auth.Subject subject,
net.sf.jguard.core.authentication.manager.AuthenticationManager authenticationManager)
JGuardCredential identifying uniquely the user.
subject - template -
net.sf.jguard.core.authentication.AuthenticationException
public static void removeCredentialValue(javax.security.auth.Subject subject,
boolean publicVisibility,
java.lang.String credentialId,
java.lang.Object credentialValue)
subject - publicVisibility - credentialId - credentialValue - public static java.util.Set getEnabledPrincipals(java.util.Set userPrincipals)
public static javax.security.auth.Subject getSubject()
SecurityExceptionthe - caller does not have the permission to call the subjectpublic static java.util.Set getJavaxSecuritySubjects(java.util.Set jguardSubjects)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||