LoginSupport

com.gu.googleauth.LoginSupport
trait LoginSupport extends Logging

Attributes

Graph
Supertypes
trait Logging
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

The configuration to use for these actions

The configuration to use for these actions

Attributes

Concrete methods

def checkIdentity()(implicit request: RequestHeader, ec: ExecutionContext): EitherT[Future, Result, UserIdentity]

Extracts user from Google response and validates it, redirecting to failureRedirectTarget if the check fails.

Extracts user from Google response and validates it, redirecting to failureRedirectTarget if the check fails.

Attributes

def enforceGoogleGroups(userIdentity: UserIdentity, requiredGoogleGroups: Set[String], googleGroupChecker: GoogleGroupChecker, errorMessage: String)(implicit request: RequestHeader, ec: ExecutionContext): EitherT[Future, Result, Unit]

Looks up user's Google Groups and ensures they belong to any that are required. Redirects to failureRedirectTarget if the user is not a member of any required group.

Looks up user's Google Groups and ensures they belong to any that are required. Redirects to failureRedirectTarget if the user is not a member of any required group.

Attributes

def processOauth2Callback()(implicit request: RequestHeader, ec: ExecutionContext): Future[Result]

Handle the OAuth2 callback, which logs the user in and redirects them appropriately.

Handle the OAuth2 callback, which logs the user in and redirects them appropriately.

Attributes

def processOauth2Callback(requiredGoogleGroups: Set[String], groupChecker: GoogleGroupChecker)(implicit request: RequestHeader, ec: ExecutionContext): Future[Result]

Handle the OAuth2 callback, which logs the user in and redirects them appropriately.

Handle the OAuth2 callback, which logs the user in and redirects them appropriately.

Also ensures the user belongs to the (provided) required Google Groups.

Attributes

def redirectWithError(target: Call, message: String): Result
def setupSessionWhenSuccessful(userIdentity: UserIdentity)(implicit request: RequestHeader): Result

Redirects user with configured play-googleauth session.

Redirects user with configured play-googleauth session.

Attributes

def startGoogleLogin()(implicit request: RequestHeader, ec: ExecutionContext): Future[Result]

Redirects user to Google to start the login.

Redirects user to Google to start the login.

Attributes

Abstract fields

The target that should be redirected to if no redirect URL is provided (generally home)

The target that should be redirected to if no redirect URL is provided (generally home)

Attributes

The target that should be redirected to if login fails

The target that should be redirected to if login fails

Attributes

Inherited fields

protected val logger: Logger

Attributes

Inherited from:
Logging

Implicits

Implicits

implicit def wsClient: WSClient