|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectno.feide.moria.store.MoriaTicket
final class MoriaTicket
This class represents the tickets used as identifiers in Moria. Each ticket has a unique key, a type and an associated service. These attributes are used for validation and authorization of incoming requests.
| Field Summary | |
|---|---|
private MoriaStoreData |
data
The data associated with this ticket. |
private java.lang.Long |
expiryTime
The time when this ticket expires, stored as milliseconds since epoch. |
private static long |
serialVersionUID
Generated serial version UID. |
private java.lang.String |
servicePrincipal
The id of the service associated with this ticket. |
private java.lang.String |
ticketId
The unique identifier of this ticket. |
private MoriaTicketType |
ticketType
The type of this ticket. |
private java.lang.String |
userorg
The userorg associated with this ticket. |
| Constructor Summary | |
|---|---|
MoriaTicket(MoriaTicketType ticketType,
java.lang.String nodeId,
java.lang.String servicePrincipal,
java.lang.Long expiryTime,
MoriaStoreData data,
java.lang.String userorg)
Constructs a new ticket with auto-generated ticket id. |
|
MoriaTicket(java.lang.String ticketId,
MoriaTicketType ticketType,
java.lang.String servicePrincipal,
java.lang.Long expiryTime,
MoriaStoreData data,
java.lang.String userorg)
Constructs a new ticket with the given arguments. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object object)
Tests if ticket is equal to another ticket. |
(package private) MoriaStoreData |
getData()
Gets the data object of this ticket. |
(package private) java.lang.Long |
getExpiryTime()
Gets the the expiry time for this ticket. |
(package private) java.lang.String |
getServicePrincipal()
Gets the value of the service principal associated with this ticket. |
(package private) java.lang.String |
getTicketId()
Gets the ticket identifier of this ticket. |
(package private) MoriaTicketType |
getTicketType()
Gets the the ticket type of this ticket. |
java.lang.String |
getUserorg()
Returns the userorg associated with this ticket, or null if none. |
(package private) boolean |
hasExpired()
Checks the ticket's expiry time versus the current time. |
int |
hashCode()
Gets the hash code of the ticket. |
(package private) static java.lang.String |
newId(java.lang.String nodeId)
Creates a new key that can be used as an identifier of the ticket. |
void |
setUserorg(java.lang.String org)
Associates a userorg with this ticket. |
java.lang.String |
toString()
Gets a string representation of the ticket. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final long serialVersionUID
private final java.lang.String ticketId
private final MoriaTicketType ticketType
private final java.lang.String servicePrincipal
private final java.lang.Long expiryTime
private final MoriaStoreData data
private java.lang.String userorg
| Constructor Detail |
|---|
MoriaTicket(MoriaTicketType ticketType,
java.lang.String nodeId,
java.lang.String servicePrincipal,
java.lang.Long expiryTime,
MoriaStoreData data,
java.lang.String userorg)
ticketType - the type of ticketnodeId - the id of the node creating this ticketservicePrincipal - the id of the service this ticket relates toexpiryTime - the time when this ticket expires (in milliseconds since Epoch)data - the data object associated with this ticket. May be nulluserorg - the userorg associated with this ticket. Can be null if unknown.
MoriaTicket(java.lang.String ticketId,
MoriaTicketType ticketType,
java.lang.String servicePrincipal,
java.lang.Long expiryTime,
MoriaStoreData data,
java.lang.String userorg)
ticketId - A key identifying this ticket.ticketType - The type of ticket.servicePrincipal - The id of the service this ticket relates to. Must be null
for SSO tickets, but not null or zero length for other
ticket types.expiryTime - The time when this ticket expires (in milliseconds since Epoch).data - The data object associated with this ticket. May be null.
Must be MoriaAuthnAttempt for login and service tickets, and
CachedUserData for SSO, TGT and proxy tickets.userorg - The userorg associated with this ticket. Can be null if unknown.
java.lang.IllegalArgumentException - If ticketId is null or zero length, if ticketType is null, if
servicePrincipal or data is inappropriate for the ticketType
or if expiryTime is in the past.| Method Detail |
|---|
java.lang.String getTicketId()
MoriaTicketType getTicketType()
java.lang.String getServicePrincipal()
boolean hasExpired()
java.lang.Long getExpiryTime()
MoriaStoreData getData()
public boolean equals(java.lang.Object object)
equals in class java.lang.Objectobject - The object to compare with.
Object.equals(java.lang.Object)public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public java.lang.String toString()
toString in class java.lang.Objectstatic java.lang.String newId(java.lang.String nodeId)
public java.lang.String getUserorg()
public void setUserorg(java.lang.String org)
org - The userorg.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||