Interface CrossAppAuthService
public interface CrossAppAuthService
A service responsible for allowing secure authentication for a user between the admin and site applications.
This service generates a single use and time sensitive token for a user from the admin application. This token is sent
to the user and he must present it in a timely manner to the site application to associate his session as authenticated
from the admin applicaiton.
- Author:
- Andre Azzolini (apazzolini)
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleanvoiduseSiteAuthToken(Long adminUserId, String token) Consumes an authentication token for the given user id and token.
-
Field Details
-
AUTH_FROM_ADMIN_URL_PARAM
- See Also:
-
AUTH_FROM_ADMIN_SESSION_VAR
- See Also:
-
-
Method Details
-
useSiteAuthToken
Consumes an authentication token for the given user id and token. This method will additionally register the current session (acquired from theRedirectAttributesargument) as having an admin authentication for the given adminUserId.- Parameters:
adminUserId-token-ra-- Throws:
IllegalArgumentException
-
isAuthedFromAdmin
boolean isAuthedFromAdmin()- Returns:
- whether or not the user is currently authenticated from the admin
-
getCurrentAuthedAdminId
Long getCurrentAuthedAdminId()- Returns:
- the id of the currently authenticated admin user. Returns null if there is no currently authenticated user
-
hasCsrPermission
boolean hasCsrPermission()- Returns:
- whether or not the user is currently authenticated from the admin and also has the CSR role
-
hasQuotePermission
boolean hasQuotePermission()- Returns:
- whether or not the user is currently authenticated from the admin and also has the CSR Quote role
-