|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jetspeed.security.SubjectHelper
public class SubjectHelper
Subject helper.
| Constructor Summary | |
|---|---|
SubjectHelper()
|
|
| Method Summary | |
|---|---|
static java.security.Principal |
getBestPrincipal(java.security.Principal[] principals,
java.lang.Class<? extends java.security.Principal> classe)
Returns the first matching principal of a given type. |
static java.security.Principal |
getBestPrincipal(javax.security.auth.Subject subject,
java.lang.Class<? extends java.security.Principal> classe)
Given a subject, finds the first principal of the given classe for that subject. |
static java.security.Principal |
getPrincipal(javax.security.auth.Subject subject,
java.lang.Class<? extends java.security.Principal> classe)
Given a subject, finds the first principal of the given classe for that subject. |
static java.security.Principal |
getPrincipal(javax.security.auth.Subject subject,
java.lang.Class<? extends java.security.Principal> classe,
java.lang.String name)
Given a subject, finds a specific principal by name of the given classe for that subject. |
static java.util.List<java.security.Principal> |
getPrincipals(javax.security.auth.Subject subject,
java.lang.Class<? extends java.security.Principal> classe)
Given a subject, finds all principals of the given classe for that subject. |
static java.util.List<JetspeedPrincipal> |
getPrincipals(javax.security.auth.Subject subject,
java.lang.String jptName)
Given a subject, finds all principals of the given JetspeedPrincipalType(JPT) for that subject. |
static UserCredential |
getUserCredential(javax.security.auth.Subject subject)
Given a subject, find the (first) UserCredential from the private credentials |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SubjectHelper()
| Method Detail |
|---|
public static java.security.Principal getPrincipal(javax.security.auth.Subject subject,
java.lang.Class<? extends java.security.Principal> classe)
Given a subject, finds the first principal of the given classe for that subject. If a principal of the given classe is not found, null is returned.
subject - The subject supplying the principals.classe - A class or interface derived from java.security.InternalPrincipal.
public static java.security.Principal getBestPrincipal(javax.security.auth.Subject subject,
java.lang.Class<? extends java.security.Principal> classe)
Given a subject, finds the first principal of the given classe for that subject. If a principal of the given classe is not found, then the first other principal is returned. If the list is empty, null is returned.
subject - The subject supplying the principals.classe - A class or interface derived from java.security.InternalPrincipal.
public static java.security.Principal getBestPrincipal(java.security.Principal[] principals,
java.lang.Class<? extends java.security.Principal> classe)
Returns the first matching principal of a given type.
principals - The array of pricinpalsclasse - The class of Principal
public static java.util.List<java.security.Principal> getPrincipals(javax.security.auth.Subject subject,
java.lang.Class<? extends java.security.Principal> classe)
Given a subject, finds all principals of the given classe for that subject. If no principals of the given class is not found, null is returned.
subject - The subject supplying the principals.classe - A class or interface derived from java.security.InternalPrincipal.
public static java.util.List<JetspeedPrincipal> getPrincipals(javax.security.auth.Subject subject,
java.lang.String jptName)
Given a subject, finds all principals of the given JetspeedPrincipalType(JPT) for that subject. If no principals of the given class is not found, null is returned.
subject - The subject supplying the principals.jptName - the name of the Jetspeed Principal Type
public static java.security.Principal getPrincipal(javax.security.auth.Subject subject,
java.lang.Class<? extends java.security.Principal> classe,
java.lang.String name)
Given a subject, finds a specific principal by name of the given classe for that subject.
subject - The subject supplying the principals.classe - A class or interface derived from java.security.InternalPrincipal.name - the name of the principal to look forpublic static UserCredential getUserCredential(javax.security.auth.Subject subject)
Given a subject, find the (first) UserCredential from the private credentials
subject - The subject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||