Questions tagged [deadbolt-2]

Deadbolt 2 is an authorization system for the Play framework, with both Scala and Java APIs.

Deadbolt 2 is an authorization system for the Play framework, offering idiomatic APIs for Java and Scala. It allows controller- and view-level constraints through

  • Role-based constraints
  • Regular expression-based constraints
  • Arbitrary user-defined constraints
44 questions
12
votes
1 answer

Play2-Auth vs SecureSocial vs Deadbolt2

I am using Play2 with scala. I am new in Play2 and scala. I need authentication and authorization in a project. So which is the best for me from following? And why? Play2-Auth SecureSocial Deadbolt2 Is any one like a Spring security? I need…
10
votes
1 answer

What is the difference between Silhouette and Deadbolt 2 in Play Framework

We have two famous plugin for authentication and authorization in Play Framework, Silhouette and Deadbolt 2. My question is What is the difference between these two plugin? and for what situation we should use Silhouette or Deadbolt 2?
Saeed Zarinfam
  • 9,818
  • 7
  • 59
  • 72
6
votes
2 answers

Scala Play 2.5 Form bindFromRequest: Cannot find any HTTP Request here?

I have one controller action implemented like this: def doChangePassword = deadbolt.Restrict(List(Array(Application.USER_ROLE_KEY)))() { request => // <<<<<<<<<<<< here is the request Future { val context =…
SkyWalker
  • 13,729
  • 18
  • 91
  • 187
6
votes
1 answer

How to integrate Play (web framework), Deadbolt (authorization) and Slick (database access)

Briefly: my application uses the Play web framework version 2.5.1. I want to use the Deadbolt authorization system, and Slick to access the user-authorization information in my database. How can I do this? Deadbolt is made specifically for Play,…
Adam Mackler
  • 1,980
  • 1
  • 18
  • 32
5
votes
0 answers

Play Scala 2.3.x - SecureSocial or Sihouette Integration to Deadbolt

I'm trying to use Deadbolt for authorization and Silhouette or SecureSocial for authentication using Play 2.3.3 and Scala 2.11.1. MyDeadboltHandler has a getSubject to override and to do that I need to retrieve the user from the request. Using…
centr
  • 645
  • 7
  • 15
4
votes
0 answers

play.core.server.netty.PlayDefaultUpstreamHandler - Cannot invoke the action java.lang.NullPointerException: null

I got error when i want to fill database in mongodb using PlayJongo. I got this error [error] - play.core.server.netty.PlayDefaultUpstreamHandler - Cannot invoke the action java.lang.NullPointerException: null at…
3
votes
0 answers

not found: value restrict deadbolt play framework

Im using play 2.6.5 and deadbolt 2.6.1 java. I am trying to add @restrict() {} but does not work. im add the import @import be.objectify.deadbolt.java.views.html.di.{restrict} but all time say me Compilation error not found: value restrict What am I…
chatzich
  • 1,083
  • 2
  • 11
  • 26
3
votes
0 answers

Deadbolt action with BodyParser parses body first and then authenticates

I'd like to use the tolerantJson body parser within a Deadbolt action like this: actionBuilders.PatternAction(value = permission.value, patternType = PatternType.EQUALITY).apply(parse.tolerantJson) But that parses the body of the request first…
Todor Kolev
  • 1,432
  • 1
  • 16
  • 33
3
votes
0 answers

Scala Test : Mock deadbolt authentication

While running scala test, how can deadbolt auth be mocked so that the requests goes through?
user170114
  • 625
  • 6
  • 16
  • 24
2
votes
0 answers

How to pass information from DeadboltHanlder to Controller-Method (Play Framework 2.8)

In our Play Framework application, we are using the Deadbolt module for user authentication. This means that the getSubject() method of our DeadboltHandler-implementation will be called before the actual Controller method. However, we need to…
dtr84
  • 241
  • 1
  • 2
  • 10
2
votes
1 answer

Json custom template using Play Twirl in Java

I am trying to create a Play custom template to return json using Twirl and am unable to find any solid examples for the same. Is there any other way in play to render a view with JSON and implement deadbolt on views if not twirl templating?
2
votes
1 answer

Restricting Access to method in Play Framework with Authorization - Java

I am having trouble grasping the idea of authorization in PlayFramework (version 2.5). My situation is I have a REST API method getUser and I want to restrict its access by performing authorization with a token that is coming in custom request…
Seeker
  • 1,877
  • 4
  • 32
  • 56
2
votes
1 answer

deadbolt2 and implicit request

I'm trying to integrate Deadbolt2 into my play framework 2.4 application. A have following piece of code in my controller import be.objectify.deadbolt.scala.{ActionBuilders, AuthenticatedRequest, DeadboltActions} import…
Peter Krejci
  • 3,182
  • 6
  • 31
  • 49
2
votes
0 answers

Dynamic permissions for model instances(objects) in deadbolt

we've got a system in which users are storing their creations(instances of models) in a database. Users can decide to share their creations with other users or groups of users. My idea here is to associate the ID of a creation to a Permission in…
2
votes
1 answer

Deadbolt 2 Restrict function has only one possible failure code

This question may have a bit of philosophical aspect to it. I have been using Deadbolt 2 (Scala) in my Play application and it works quite well. In looking at the Restrict function definition (line 47) I noticed that it will invoke the…
Joel
  • 572
  • 5
  • 18
1
2 3