public class InMemoryTicketComponentImpl extends Object implements TicketComponent
| Modifier and Type | Class and Description |
|---|---|
static class |
InMemoryTicketComponentImpl.ExpiryMode |
static class |
InMemoryTicketComponentImpl.Ticket
Ticket
|
| Modifier and Type | Field and Description |
|---|---|
static String |
GRANTED_AUTHORITY_TICKET_PREFIX
Ticket prefix
|
| Constructor and Description |
|---|
InMemoryTicketComponentImpl()
IOC constructor
|
| Modifier and Type | Method and Description |
|---|---|
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(Object obj) |
String |
getAuthorityForTicket(String ticketString)
Get the authority for the given ticket
|
String |
getCurrentTicket(String userName,
boolean autoCreate)
Get the current ticket
|
String |
getNewTicket(String userName)
Register a new ticket
|
Set<String> |
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
|
boolean |
getUseSingleTicketPerUser()
Does this ticket component support a single ticket per user or one ticket for each time they login?
|
int |
hashCode() |
void |
invalidateTicketById(String ticketString)
Invalidate the tickets by id
|
void |
invalidateTicketByUser(String userName)
Invalidate all user tickets
|
int |
invalidateTickets(boolean expiredOnly)
Invalidate tickets
|
void |
setExpiryMode(String expiryMode)
How should tickets expire.
|
void |
setOneOff(boolean oneOff)
Are tickets single use
|
void |
setTicketsCache(SimpleCache<String,InMemoryTicketComponentImpl.Ticket> ticketsCache)
Set the ticket cache to support clustering
|
void |
setTicketsExpire(boolean ticketsExpire)
Do tickets expire
|
void |
setUseSingleTicketPerUser(boolean useSingleTicketPerUser) |
void |
setValidDuration(String validDuration)
How long are tickets valid (XML duration as a string)
|
String |
validateTicket(String ticketString)
Check that a certificate is valid and can be used in place of a login.
|
public static final String GRANTED_AUTHORITY_TICKET_PREFIX
public void setTicketsCache(SimpleCache<String,InMemoryTicketComponentImpl.Ticket> ticketsCache)
public void setUseSingleTicketPerUser(boolean useSingleTicketPerUser)
useSingleTicketPerUser - the useSingleTicketPerUser to setpublic boolean getUseSingleTicketPerUser()
TicketComponentgetUseSingleTicketPerUser in interface TicketComponentpublic void setOneOff(boolean oneOff)
public void setTicketsExpire(boolean ticketsExpire)
public void setExpiryMode(String expiryMode)
public void setValidDuration(String validDuration)
public String getNewTicket(String userName) throws AuthenticationException
TicketComponentgetNewTicket in interface TicketComponentuserName - StringAuthenticationExceptionpublic String validateTicket(String ticketString) throws AuthenticationException
TicketComponentvalidateTicket in interface TicketComponentticketString - StringAuthenticationExceptionpublic void invalidateTicketById(String ticketString)
TicketComponentinvalidateTicketById in interface TicketComponentticketString - Stringpublic Set<String> getUsersWithTickets(boolean nonExpiredOnly)
TicketComponentgetUsersWithTickets in interface TicketComponentnonExpiredOnly - true for non expired tickets, false for all (including expired) ticketspublic int countTickets(boolean nonExpiredOnly)
TicketComponentcountTickets in interface TicketComponentnonExpiredOnly - true for non expired tickets, false for all (including expired) ticketspublic int invalidateTickets(boolean expiredOnly)
TicketComponentinvalidateTickets in interface TicketComponentexpiredOnly - true for EXPIRED tickets, false for ALL (including non-expired) ticketspublic void invalidateTicketByUser(String userName)
TicketComponentinvalidateTicketByUser in interface TicketComponentuserName - Stringpublic String getAuthorityForTicket(String ticketString)
TicketComponentgetAuthorityForTicket in interface TicketComponentticketString - Stringpublic String getCurrentTicket(String userName, boolean autoCreate)
TicketComponentgetCurrentTicket in interface TicketComponentuserName - StringautoCreate - should we create one automatically if there isn't one?public void clearCurrentTicket()
TicketComponentclearCurrentTicket in interface TicketComponentpublic static void clearCurrentSecurityContext()
Copyright © 2005–2018 Alfresco Software. All rights reserved.