aboutsummaryrefslogtreecommitdiff
path: root/core-rest/src/main/scala/xyz/driver/core/rest/auth/Authorization.scala
diff options
context:
space:
mode:
authorJakob Odersky <jakob@driver.xyz>2018-09-12 16:40:57 -0700
committerJakob Odersky <jakob@odersky.com>2018-10-09 16:19:39 -0700
commit4d1197099ce4e721c18bf4cacbb2e1980e4210b5 (patch)
tree1d3c2e482d5acf8ca613ba65fb5401c41ad686b5 /core-rest/src/main/scala/xyz/driver/core/rest/auth/Authorization.scala
parent7c755c77afbd67ae2ded9d8b004736d4e27e208f (diff)
downloaddriver-core-4d1197099ce4e721c18bf4cacbb2e1980e4210b5.tar.gz
driver-core-4d1197099ce4e721c18bf4cacbb2e1980e4210b5.tar.bz2
driver-core-4d1197099ce4e721c18bf4cacbb2e1980e4210b5.zip
Move REST functionality to separate project
Diffstat (limited to 'core-rest/src/main/scala/xyz/driver/core/rest/auth/Authorization.scala')
-rw-r--r--core-rest/src/main/scala/xyz/driver/core/rest/auth/Authorization.scala11
1 files changed, 11 insertions, 0 deletions
diff --git a/core-rest/src/main/scala/xyz/driver/core/rest/auth/Authorization.scala b/core-rest/src/main/scala/xyz/driver/core/rest/auth/Authorization.scala
new file mode 100644
index 0000000..1a5e9be
--- /dev/null
+++ b/core-rest/src/main/scala/xyz/driver/core/rest/auth/Authorization.scala
@@ -0,0 +1,11 @@
+package xyz.driver.core.rest.auth
+
+import xyz.driver.core.auth.{Permission, User}
+import xyz.driver.core.rest.ServiceRequestContext
+
+import scala.concurrent.Future
+
+trait Authorization[U <: User] {
+ def userHasPermissions(user: U, permissions: Seq[Permission])(
+ implicit ctx: ServiceRequestContext): Future[AuthorizationResult]
+}