ScentryStrategy

org.scalatra.auth.ScentryStrategy
trait ScentryStrategy[UserType <: AnyRef]

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class BasicAuthStrategy[UserType]

Members list

Value members

Abstract methods

protected def app: ScalatraBase
def authenticate()(implicit request: HttpServletRequest, response: HttpServletResponse): Option[UserType]

Perform the authentication for this strategy

Perform the authentication for this strategy

Attributes

Returns

a UserType option where None indicates auth failure

Concrete methods

def afterAuthenticate(winningStrategy: String, user: UserType)(implicit request: HttpServletRequest, response: HttpServletResponse): Unit

Perform stuff after authentication only run when the module is valid

Perform stuff after authentication only run when the module is valid

Attributes

def afterFetch(user: UserType)(implicit request: HttpServletRequest, response: HttpServletResponse): Unit

Perform stuff after fetching and serializing the user from session

Perform stuff after fetching and serializing the user from session

Attributes

def afterLogout(user: UserType)(implicit request: HttpServletRequest, response: HttpServletResponse): Unit

Perform stuff after logging the user out and invalidating the session

Perform stuff after logging the user out and invalidating the session

Attributes

def afterSetUser(user: UserType)(implicit request: HttpServletRequest, response: HttpServletResponse): Unit

Perform stuff after setting the user in the session

Perform stuff after setting the user in the session

Attributes

def beforeAuthenticate(implicit request: HttpServletRequest, response: HttpServletResponse): Unit

Perform stuff before authenticating, only run when the module is valid

Perform stuff before authenticating, only run when the module is valid

Attributes

def beforeFetch[IdType](userId: IdType)(implicit request: HttpServletRequest, response: HttpServletResponse): Unit

Perform stuff before fetching and serializing the user from session

Perform stuff before fetching and serializing the user from session

Attributes

def beforeLogout(user: UserType)(implicit request: HttpServletRequest, response: HttpServletResponse): Unit

Perform stuff before logging the user out and invalidating the session

Perform stuff before logging the user out and invalidating the session

Attributes

def beforeSetUser(user: UserType)(implicit request: HttpServletRequest, response: HttpServletResponse): Unit

Perform stuff before setting the user in the session

Perform stuff before setting the user in the session

Attributes

def createStrategy(app: ScalatraBase): ScentryStrategy.this.type
def isValid(implicit request: HttpServletRequest): Boolean

Indicates if this strategy should be run.

Indicates if this strategy should be run.

Attributes

Returns

a Boolean to indicate validity

def name: String
def registerWith(registrar: Scentry[UserType]): Unit
def unauthenticated()(implicit request: HttpServletRequest, response: HttpServletResponse): Unit

Perform stuff when the request is unauthenticated and the strategy is valid

Perform stuff when the request is unauthenticated and the strategy is valid

Attributes