public class ShiroUtils extends Object
Constructor and Description |
---|
ShiroUtils() |
Modifier and Type | Method and Description |
---|---|
static PortofinoRealm |
getPortofinoRealm() |
static Object |
getPrimaryPrincipal(Subject s)
Returns the primary principal for a Subject - that is, in Portofino, the username.
|
static Object |
getPrincipal(Subject s,
int i)
Returns the nth principal of the given Subject.
|
static Serializable |
getUserId(Subject subject) |
public static final String copyright
public static Object getPrimaryPrincipal(Subject s)
s
- the subjectpublic static Object getPrincipal(Subject s, int i)
s
- the subjecti
- the zero-based index of the principalIndexOutOfBoundsException
- if the index is greather than the number of principals associated with the
subject.public static PortofinoRealm getPortofinoRealm()
public static Serializable getUserId(Subject subject)