| Constructor and Description |
|---|
AuthSessionStore(javax.inject.Provider<Session> session) |
| Modifier and Type | Method and Description |
|---|---|
Optional<U> |
get(String id)
Call it after a successful authentication in order to restore an
UserProfile. |
void |
set(U profile)
Call it after a successful authentication in order to store an
UserProfile. |
Optional<U> |
unset(String id)
Call it on logout in order to remove an
UserProfile from the store. |
@Inject public AuthSessionStore(javax.inject.Provider<Session> session)
public Optional<U> get(String id) throws Exception
AuthStoreUserProfile. If
profile is present, no authentication is required because user was already authenticated.public void set(U profile) throws Exception
AuthStoreUserProfile. The user
was successfully authenticated and we want to save it somewhere.Copyright © 2016. All rights reserved.