Interface CrossAppAdminAuthService


public interface CrossAppAdminAuthService
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:
  • Method Details

    • getUrlForSiteAuth

      String getUrlForSiteAuth(String forwardUrl, List<String> rolesToContrib)
    • getRedirectUrlForSiteAuth

      String getRedirectUrlForSiteAuth(String forwardUrl, List<String> rolesToContrib)
      Composes a full URL that can be returned from a controller to redirect the user to the cross app authentication controller endpoint on the site application.
      Parameters:
      forwardUrl - (not URL encoded)
      rolesToContrib -
      Returns:
      the redirect url
    • generateTokenForSiteAuth

      String generateTokenForSiteAuth(Long adminUserId)
      Parameters:
      adminUserId -
      Returns:
      the generated token
      See Also:
    • generateTokenForSiteAuth

      String generateTokenForSiteAuth(Long adminUserId, List<String> rolesToContrib)
      Returns a randomly generated String that the user can then include in a request from the site application to associate his site session with an admin user.

      If the rolesToContrib parameter is not null, the roles in that list will be added to the site user when the token is claimed.

      Parameters:
      adminUserId -
      rolesToContrib -
      Returns:
      the generated token