|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.security.authentication.InMemoryTicketComponentImpl
public class InMemoryTicketComponentImpl
Store tickets in memory. They can be distributed in a cluster via the cache
Nested Class Summary | |
---|---|
static class |
InMemoryTicketComponentImpl.ExpiryMode
|
static class |
InMemoryTicketComponentImpl.Ticket
Ticket |
Field Summary | |
---|---|
static java.lang.String |
GRANTED_AUTHORITY_TICKET_PREFIX
Ticket prefix |
Constructor Summary | |
---|---|
InMemoryTicketComponentImpl()
IOC constructor |
Method Summary | |
---|---|
static void |
clearCurrentSecurityContext()
|
void |
clearCurrentTicket()
Clear the current ticket |
int |
countTickets(boolean nonExpiredOnly)
Count tickets This may be higher than the user count, since a user can have more than one ticket/session |
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getAuthorityForTicket(java.lang.String ticketString)
Get the authority for the given ticket |
java.lang.String |
getCurrentTicket(java.lang.String userName,
boolean autoCreate)
Get the current ticket |
java.lang.String |
getNewTicket(java.lang.String userName)
Register a new ticket |
java.util.Set |
getUsersWithTickets(boolean nonExpiredOnly)
Get set of users with tickets This may be lower than the ticket count, since a user can have more than one ticket/session |
int |
hashCode()
|
void |
invalidateTicketById(java.lang.String ticketString)
Invalidate the tickets by id |
void |
invalidateTicketByUser(java.lang.String userName)
Invalidate all user tickets |
int |
invalidateTickets(boolean expiredOnly)
Invalidate tickets |
void |
setExpiryMode(java.lang.String expiryMode)
How should tickets expire. |
void |
setOneOff(boolean oneOff)
Are tickets single use |
void |
setTicketsCache(SimpleCache ticketsCache)
Set the ticket cache to support clustering |
void |
setTicketsExpire(boolean ticketsExpire)
Do tickets expire |
void |
setValidDuration(java.lang.String validDuration)
How long are tickets valid (XML duration as a string) |
java.lang.String |
validateTicket(java.lang.String ticketString)
Check that a certificate is valid and can be used in place of a login. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String GRANTED_AUTHORITY_TICKET_PREFIX
Constructor Detail |
---|
public InMemoryTicketComponentImpl()
Method Detail |
---|
public void setTicketsCache(SimpleCache ticketsCache)
ticketsCache
- public java.lang.String getNewTicket(java.lang.String userName) throws AuthenticationException
TicketComponent
getNewTicket
in interface TicketComponent
AuthenticationException
public java.lang.String validateTicket(java.lang.String ticketString) throws AuthenticationException
TicketComponent
validateTicket
in interface TicketComponent
AuthenticationException
public void invalidateTicketById(java.lang.String ticketString)
TicketComponent
invalidateTicketById
in interface TicketComponent
public java.util.Set getUsersWithTickets(boolean nonExpiredOnly)
TicketComponent
getUsersWithTickets
in interface TicketComponent
nonExpiredOnly
- true for non expired tickets, false for all (including expired) tickets
public int countTickets(boolean nonExpiredOnly)
TicketComponent
countTickets
in interface TicketComponent
nonExpiredOnly
- true for non expired tickets, false for all (including expired) tickets
public int invalidateTickets(boolean expiredOnly)
TicketComponent
invalidateTickets
in interface TicketComponent
expiredOnly
- true for EXPIRED tickets, false for ALL (including non-expired) tickets
public void invalidateTicketByUser(java.lang.String userName)
TicketComponent
invalidateTicketByUser
in interface TicketComponent
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public void setOneOff(boolean oneOff)
oneOff
- public void setTicketsExpire(boolean ticketsExpire)
ticketsExpire
- public void setExpiryMode(java.lang.String expiryMode)
exipryMode
- public void setValidDuration(java.lang.String validDuration)
validDuration
- public java.lang.String getAuthorityForTicket(java.lang.String ticketString)
TicketComponent
getAuthorityForTicket
in interface TicketComponent
public java.lang.String getCurrentTicket(java.lang.String userName, boolean autoCreate)
TicketComponent
getCurrentTicket
in interface TicketComponent
autoCreate
- should we create one automatically if there isn't one?
public void clearCurrentTicket()
TicketComponent
clearCurrentTicket
in interface TicketComponent
public static void clearCurrentSecurityContext()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |