public class SessionCreator extends Object
| Constructor and Description |
|---|
SessionCreator(UserService userService,
AuditEventSender auditEventSender) |
| Modifier and Type | Method and Description |
|---|---|
Optional<org.apache.shiro.session.Session> |
create(String currentSessionId,
String host,
ActorAwareAuthenticationToken authToken)
Attempts to log the user in with the given authentication token and returns a new or renewed session upon
success.
|
@Inject public SessionCreator(UserService userService, AuditEventSender auditEventSender)
public Optional<org.apache.shiro.session.Session> create(@Nullable String currentSessionId, String host, ActorAwareAuthenticationToken authToken) throws AuthenticationServiceUnavailableException
Side effect: the user will be registered with the current security context.
currentSessionId - A session id, if one exists currently.host - Host the request to create a session originates from.authToken - Authentication token to log the user in.Optional, or an empty Optional if
authentication failed.AuthenticationServiceUnavailableException - If authenticating the user fails not due to an issue with the
credentials but because of an external resource being
unavailableCopyright © 2012–2021 Graylog, Inc.. All rights reserved.