play-pac4j | Security library for Play framework 2 in Java and Scala: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT | Authentication library
kandi X-RAY | play-pac4j Summary
kandi X-RAY | play-pac4j Summary
The play-pac4j project is an easy and powerful security library for Play framework v2 web applications and web services which supports authentication and authorization, but also logout and advanced features like CSRF protection. It can work with Deadbolt. It's based on JDK 11 and Play 2.8 (Scala v2.12 or v2.13) and on the pac4j security engine v5. It's available under the Apache 2 license.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Start authentication .
- Adapt the given HttpAction to a Response .
- Renames a session .
- supplies the response to result
- Sets the value for a session .
- Internal call .
- Parse the body as a Map .
- Logs out the current request .
- Performs the actual playback .
- Get a deadbolt handler .
play-pac4j Key Features
play-pac4j Examples and Code Snippets
Community Discussions
Trending Discussions on play-pac4j
QUESTION
We use play-pac4j for our authentication in our play application.
We would like to have the same route/controller endpoint but with a different behaviour dependending on the user Role.
Conceptually, this would do something like:
...ANSWER
Answered 2021-Oct-15 at 11:48I don't think you'll be able to compose in a orElse
manner the Action
s.
However you should be able to create a "combined" ActionBuilder
that uses your 2 existing ActionBuilder
s and do the orElse
logic. Though you would only be able to provide one body to run. And this body would have to rely on something like the AuthenticatedRequest#profiles
to determine what to do.
Something like:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install play-pac4j
You can use play-pac4j like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the play-pac4j component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page