case class Secure(operation: Permissible, request: RequestType) extends Product with Serializable
Methods for handling requests with authentication and authorization.
Secures against a given operation Secure.operation.
- operation
Permissible operation to secure against
- request
RequestType incoming http request
- Attributes
- protected[org.hungerford.rbac]
- Alphabetic
- By Inheritance
- Secure
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Secure(operation: Permissible, request: RequestType)
- operation
Permissible operation to secure against
- request
RequestType incoming http request
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
-
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 operation: Permissible
- val request: RequestType
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
tryWithPermission[T](handler: (Try[Permission]) ⇒ T): T
Authenticates and authorizes request against an operation, and executes a handler to handle either authenticated permissions or exceptions returned by authentication or authorization.
Authenticates and authorizes request against an operation, and executes a handler to handle either authenticated permissions or exceptions returned by authentication or authorization.
- T
Return type of handler
- handler
Try[Permission]=>T
- returns
T
-
def
tryWithRole[T](handler: (Try[Role]) ⇒ T): T
Authenticates and authorizes request against an operation, and executes a handler to handle either authenticated roles or exceptions returned by authentication or authorization.
Authenticates and authorizes request against an operation, and executes a handler to handle either authenticated roles or exceptions returned by authentication or authorization.
- T
Return type of handler
- handler
Try[Role]=>T
- returns
T
-
def
tryWithUser[T](handler: (Try[UserType]) ⇒ T): T
Authenticates and authorizes request against an operation, and executes a function to handle either authenticated user or exceptions returned by authentication or authorization.
Authenticates and authorizes request against an operation, and executes a function to handle either authenticated user or exceptions returned by authentication or authorization.
- T
Return type of handler
- handler
Try[Role]=>T
- returns
T
-
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 and authorizes request against an operation, executing a function to handle authenticated permissions.
Authenticates and authorizes request against an operation, executing a function to handle authenticated permissions.
- T
Return type of handler
- handler
Permission=>T
- returns
T
- Annotations
- @throws( ... ) @throws( ... )
- Exceptions thrown
AuthenticationException
if authentication failsAuthorizationException
if authenticated permissions are not permitted to execute operation
-
def
withRole[T](handler: (Role) ⇒ T): T
Authenticates and authorizes request against an operation, executing a function to handle authenticated role.
Authenticates and authorizes request against an operation, executing a function to handle authenticated role.
- T
Return type of handler
- handler
Role=>T
- returns
T
- Annotations
- @throws( ... ) @throws( ... )
- Exceptions thrown
AuthenticationException
if authentication failsAuthorizationException
if authenticated role is not permitted to execute operation
-
def
withUser[T](handler: (UserType) ⇒ T): T
Authenticates and authorizes request against an operation, executing a function to handle authenticated user.
Authenticates and authorizes request against an operation, executing a function to handle authenticated user.
- T
Return type of handler
- handler
UserType=>T
- returns
T
- Annotations
- @throws( ... ) @throws( ... )
- Exceptions thrown
AuthenticationException
if authentication failsAuthorizationException
if authenticated user is not permitted to execute operation