public class AuthUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
ADDAUTH_REDIRECT_SESSION_VAR
The session variable holding the redirect when adding a source for a signed in user
|
static String |
SOURCE_SESSION_VAR
The session variable holding the sign on source for the currently signed in user
|
static String |
UID_SESSION_VAR
The session variable holding the UID for the currently signed in user
|
| Constructor and Description |
|---|
AuthUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addListener(UserActionListener listener) |
static UserAccount |
createNewUserAccount(boolean b) |
static UserAuthSource |
createSource(UserAccount newUser,
String source,
String screenName,
String body) |
static UserAuthSource |
getBySourceScreenname(String source,
String screenName) |
static UserAuthSource |
getCurrentSource(javax.servlet.http.HttpServletRequest req)
Get the UserAuthSource for the currently signed in user, or null if no user is signed in.
|
static UserAccount |
getCurrentUser(javax.servlet.http.HttpServletRequest req)
Return the currently signed in user, or null if no user is signed in.
|
static void |
prepAuthFlow(javax.servlet.http.HttpServletRequest req) |
static void |
removeSourceIfExists(UserAccount acct,
String source) |
static void |
setUserAccountProvider(UserAccountProvider provider) |
static void |
signOff(javax.servlet.http.HttpServletRequest req)
Mark a user as signed off.
|
static void |
signOn(javax.servlet.http.HttpServletRequest req,
UserAccount user,
UserAuthSource source)
Mark a user as signed on unless the account is inactive, in which case we throw an error.
|
public static final String UID_SESSION_VAR
public static final String SOURCE_SESSION_VAR
public static final String ADDAUTH_REDIRECT_SESSION_VAR
public static void setUserAccountProvider(UserAccountProvider provider)
public static void prepAuthFlow(javax.servlet.http.HttpServletRequest req)
public static UserAccount getCurrentUser(javax.servlet.http.HttpServletRequest req)
req - the HttpServletRequest holding auth credentials.public static UserAuthSource getCurrentSource(javax.servlet.http.HttpServletRequest req)
req - the HttpServletRequest holding auth credentials.public static void signOn(javax.servlet.http.HttpServletRequest req,
UserAccount user,
UserAuthSource source)
throws IOException
req - the HttpServletRequest holding auth credentials.user - the UserAccount to sign on.source - the source from which the user account signed on.IOException - if an error occurs processing signon.public static void signOff(javax.servlet.http.HttpServletRequest req)
req - the HttpServletRequest holding auth credentials.public static void removeSourceIfExists(UserAccount acct, String source)
public static UserAuthSource getBySourceScreenname(String source, String screenName)
public static UserAuthSource createSource(UserAccount newUser, String source, String screenName, String body)
public static UserAccount createNewUserAccount(boolean b)
public static void addListener(UserActionListener listener)
Copyright © 2018 Orbital Enterprises. All rights reserved.