Pac4j is an open source security framework for java applications handling authentication and authorisation created and maintained by CAS in the cloud.
Questions tagged [pac4j]
77 questions
0
votes
1 answer
Is it possible to use Facebook limited login via OpenID Connect with Pac4J?
I use Pac4J to authenticate users via OpenID Connect (OIDC). Note: We don't use Pac4J as a framework to do our session handling, but just as a library for OIDC. I authenticate the callback like this:
Optional credentials =…

Simon Tenbeitel
- 835
- 1
- 8
- 20
0
votes
1 answer
pac4j raises "State cannot be determined" when trying to get keycloakOidcProfile after OIDC callback and Keycloak provider
I am trying to implement pac4j openid with keycloak in Spring webflux project with JAVA 19 and spring boot 3.0.3.
I am also facing same issue while fetching KeycloakOidcProfile after authentication is done in keycloak.
I notice that when it redirect…

Khyati
- 13
- 4
0
votes
1 answer
unable to get configured roles from IDP ( Azure Ad App roles ) when authenticating oidc (pac4j-oidc ) in servlet based application
I am using javaee-pac4j:7.1.0 and pac4j-oidc:5.7.0 to my application authenticated using OIDC ( Azure AD initially ) in servlet based application , i am able to redirect to azure for authentication and callback api is also getting called with…

Gaurav
- 33
- 8
0
votes
1 answer
Replacement for deprecated getPermission method in UserProfile Pac4J
We are using PAC4J version 5.7.1 in Java and recently I have noticed the getPermissions() method in UserProfile class is tagged as deprecated. We are still using this component and did not find any replacement for it in the documentation. The…

Ahmad Kamal
- 3
- 2
0
votes
1 answer
Retrieving user's groups from Keycloak via pac4j library
I'm protecting a JavaEE running on Tomcat with the library javaee-pac4j with an OpenID Connect flow (with library pac4j-oidc) that is managed by a Keycloak istance.
After a successful login in Keycloak for a protected resource, I obtain the…

Arrigo Pierotti
- 1
- 1
0
votes
1 answer
looking for pac4j with javax servlet with java 17
I am trying to use pac4j for my oidc implementation with javax.servlet based we application which already have database authentication .
Is there any version which is compatible with java 17 and javax.servlet. and by when i should expect in…

Gaurav
- 33
- 8
0
votes
1 answer
pac4j raises "State cannot be determined" after OIDC callback and Keycloak provider
I am currently trying to use testing Pac4j (v4.5.7) along with Payara 5 (Java 8) and Keycloak 16.1.1 after a previous attempt to use the OIDC Connect client available with Payara API.
I simply tried to use a single pac4j client, the OIDC…
0
votes
1 answer
NullPointerException when trying to extract credentials in DirectClient class (base class of DirectBearerAuthClient)
I am using PAC4J version 5.7.0 in Java. In our case, we are using JWT with DirectBearerAuthClient for authentication purpose. We have occasionally observed NullPointerException and below is the reproducing steps:
The backend server with PAC4J is up…

Anthony Lee
- 3
- 2
0
votes
1 answer
Got error "No implementation for play.cache.SyncCacheApi was bound" when using guice and pac4j
Here is the code I ran:
package org.example;
import com.google.inject.*;
import org.pac4j.core.context.session.SessionStore;
import org.pac4j.play.store.PlayCacheSessionStore;
import org.pac4j.play.store.PlaySessionStore;
import…

al2co33
- 1
- 1
0
votes
1 answer
Druid set maxAge in pac4j extension
I'm using the Druid Pac4j library for authentication for druid web console, which is deployed in kubernetes using terraform. Currently, I'm encountering an issue where the session token obtained through Pac4j expires after 15 minutes (900 seconds),…

ragav ravi
- 23
- 4
0
votes
1 answer
Implementing multi-tenant authentication with Pac4J and OpenID Connect in JavaEE
I am currently working on implementing a multi-tenant application in JavaEE, where I am using Pac4J as the authentication framework and an OpenID Connect Identity provider. Each tenant in my application is identified by a unique identifier provided…

finwes
- 13
- 4
0
votes
1 answer
pac4j Bad User Info response allows user to login
I am trying to use https://www.pac4j.org/docs/clients/openid-connect.html docs to integrate my application but if access token destroyed(session destroyed in case of keycloak) using header client like below:
HeaderClient client = new…

capacman
- 317
- 1
- 4
- 7
0
votes
1 answer
pac4j configure authorizers with OR
I am using DirectBearerAuthClient with Authorizes.
According to the pac4j default behavior if multiple authorizes aredefined , then all should be stisfied, lets take below example, there are two authorizes and a URL
Authorizer : allowRead,…

Ijaz Ahmed
- 2,330
- 4
- 19
- 27
0
votes
1 answer
Pac4j(http4s-pac4j): SecurityFilterMiddleware: Fallbacking to AnonymousProfile using OIDC?
I have questions about OidcClient and AnonymousClient.
Can we use SecurityFilterMiddleware to configure endpoints like the following?
Create a Profile based on that information if already logged in with OIDC
If not, create an AnonymousProfile…

Windymelt
- 139
- 8
0
votes
1 answer
pac4j for jee - is it possible to load external properties file instead of hardcode config in the implementation of ConfigFactory
I find out the official demo about the pac4j for JEE: jee-pac4j-demo in github (https://github.com/pac4j/jee-pac4j-demo)
The configuration for each Authentication mechanisms have defined in the org.pac4j.demo.jee.DemoConfigFactory, refer to the…

Carson
- 21
- 2