case class Authenticate(request: RequestType) extends Product with Serializable
Methods for handling requests with authentication.
- request
RequestType
- Attributes
- protected[org.hungerford.rbac]
- Alphabetic
- By Inheritance
- Authenticate
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Authenticate(request: RequestType)
- request
RequestType
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply[T](block: ⇒ T): T
Authenticates a request and either executes a given code block or throws an exception.
Authenticates a request and either executes a given code block or throws an exception.
- T
code block result type
- block
code you want executed
- Annotations
- @throws( ... )
- Exceptions thrown
AuthenticationException
if authentication fails
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val request: RequestType
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
tryTo[T](block: (Option[Throwable]) ⇒ T): T
Authenticates a request and executes a given function that can handle auth exceptions if they arise.
Authenticates a request and executes a given function that can handle auth exceptions if they arise.
- T
code block result type
- block
Option[Throwable]=>T code you want executed that handles auth exceptions
-
def
tryWithPermission[T](handler: (Try[Permission]) ⇒ T): T
Authenticates a request and executes a given code block, passing to it either an authenticated permission instance or an exception if authentication fails
Authenticates a request and executes a given code block, passing to it either an authenticated permission instance or an exception if authentication fails
- T
code block result type
- handler
Try[Permission]=>T code you want executed
-
def
tryWithRole[T](handler: (Try[Role]) ⇒ T): T
Authenticates a request and executes a given code block, passing to it either the authenticated role instance or an exception if authentication fails
Authenticates a request and executes a given code block, passing to it either the authenticated role instance or an exception if authentication fails
- T
code block result type
- handler
Try[Role]=>T code you want executed
-
def
tryWithUser[T](handler: (Try[UserType]) ⇒ T): T
Authenticates a request and executes a given code block, passing to it either the authenticated user instance or an exception if authentication fails
Authenticates a request and executes a given code block, passing to it either the authenticated user instance or an exception if authentication fails
- T
code block result type
- handler
Try[User]=>T code you want executed
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
withPermission[T](handler: (Permission) ⇒ T): T
Authenticates a request and passes retrieved permission to a given code block or throws an exception if authentication fails.
Authenticates a request and passes retrieved permission to a given code block or throws an exception if authentication fails.
- T
code block result type
- handler
Permission=>T code you want executed
- Annotations
- @throws( ... )
- Exceptions thrown
AuthenticationException
if authentication fails
-
def
withRole[T](handler: (Role) ⇒ T): T
Authenticates a request and passes retrieved role to a given code block or throws an exception if authentication fails.
Authenticates a request and passes retrieved role to a given code block or throws an exception if authentication fails.
- T
code block result type
- handler
Role=>T code you want executed
- Annotations
- @throws( ... )
- Exceptions thrown
AuthenticationException
if authentication fails
-
def
withUser[T](handler: (UserType) ⇒ T): T
Authenticates a request and passes retrieved user to a given code block or throws an exception if authentication fails.
Authenticates a request and passes retrieved user to a given code block or throws an exception if authentication fails.
- T
code block result type
- handler
User=>T code you want executed
- Annotations
- @throws( ... )
- Exceptions thrown
AuthenticationException
if authentication fails