deadbolt

Deadbolt play java Change password the first time login

不打扰是莪最后的温柔 提交于 2019-12-25 09:16:16
问题 I have 4 group: admin, service, user, guest, admin is created in database, the first time admin login required change password, I want to redirect to form change password and only admin need that, I set redirect in onAuthFailure, but service, user, guest that not authentication in some action and redirect change password form, have a good idea, please tell me, what should I do for every role redirect an other link? , I just read document about deadbolt in 2 day, can I don't understand more,

Questions about installing Deadbolt on Play 2.2.1

不羁岁月 提交于 2019-12-24 05:10:25
问题 As stated here if I put the resolvers in plugins.sbt Play doesn't see them. But it works if I move them in build.sbt . Is there a reason? Another problem: if there isn't the file play.plugins I get this error: "**Exception:** The Deadbolt Java plugin was not registered, or is disabled. Please check your conf/play.plugins file." But it isn't written in any installation guide that play.plugins is needed to install Deadbolt (maybe it was needed for older version). source 1 source 2 In conclusion

SSO using SAML 2.0 for Scala Play web application

放肆的年华 提交于 2019-12-23 11:55:19
问题 I am building a scala play web application and I need to build the SSO functionality with an IdP which support SAML v2.0. In addition to SSO, I need to build authorization mechanism within the application based on the roles received from IdP as an attribute of Authentication Assertion message. I am new to SAML and SSO area. Based on some quick learning about the SAML and available module options in Play scala, I see below options to use with scala play web application, Play-pac4J (for

Deadbolt: show parts of template only for current logged user

巧了我就是萌 提交于 2019-12-08 12:56:38
问题 In my system every user has an own public profile. I want to show an "Edit" button only on the profile page of the current logged user. Now I'm doing this by using this code @subjectPresent() { @if(userProfile == userLogged){ <button>Edit</button> } } where userProfile is the owner user of the current page, and userLogged is the actual logged user. Considering that I will have to do this check a lot of times, is there in Deadbolt or Scala a better (cleaner) way to do it? 回答1: As David

Deadbolt - Play Framework - How to check a @RestrictedResource with parameters in a controller?

三世轮回 提交于 2019-12-05 21:41:43
With Deadbolt's module we can check the restrictedResource with a ressource name and parameters in the view. For example in my view, I have it, and it works well: #{deadbolt.restrictedResource resourceKeys:['Domain'] , resourceParameters:['domainid':domain.id]} <li><a href="@{Admin.showDomain(domain.id)}">${domain.title}</a></li> #{/deadbolt.restrictedResource} But in my controller, I just can check the ressource name but I don't find a way to check it in my RestrictedResourcesHandler passing the domainid with. I am looking for a solution to do something like that: @RestrictedResource(name = {

UNRESOLVED DEPENDENCIES installing Deadbolt on Play Framework 2.2.1

可紊 提交于 2019-11-29 10:03:40
I'd like to try Deadbolt. What are the steps to install it on the new Play Framework 2.2.1? What I found is resolvers and dependencies here . But where I have to put the resolvers? I don't want to use Build.scala (in Play 2.2 there's build.sbt ) And here is a line about plugin . Where it goes? In my project there isn't plugins.sbt and don't know if Play 2.2 prefers to put it elsewhere. EDIT : plugin.sbt resolvers ++= Seq( "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/", Resolver.url("Objectify Play Repository", url("http://schaloner.github.io/releases/"))(Resolver

UNRESOLVED DEPENDENCIES installing Deadbolt on Play Framework 2.2.1

£可爱£侵袭症+ 提交于 2019-11-28 03:25:12
问题 I'd like to try Deadbolt. What are the steps to install it on the new Play Framework 2.2.1? What I found is resolvers and dependencies here. But where I have to put the resolvers? I don't want to use Build.scala (in Play 2.2 there's build.sbt ) And here is a line about plugin . Where it goes? In my project there isn't plugins.sbt and don't know if Play 2.2 prefers to put it elsewhere. EDIT : plugin.sbt resolvers ++= Seq( "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/",