Skip to content
Snippets Groups Projects
Commit 0473bc19 authored by Johaney-s's avatar Johaney-s
Browse files

fixed test

parent 2b080254
No related branches found
No related tags found
No related merge requests found
Pipeline #12455 passed
......@@ -15,6 +15,7 @@ import org.slf4j.LoggerFactory;
import jakarta.ws.rs.core.Response;
import java.util.Locale;
import java.util.Map;
public class CustomAuthenticator implements Authenticator {
......@@ -41,12 +42,13 @@ public class CustomAuthenticator implements Authenticator {
public void authenticate(AuthenticationFlowContext context) {
log.warn("Custom EGI authenticator");
AuthenticationSessionModel authSession = context.getAuthenticationSession();
Map<String, String> userSessionNotes = authSession.getUserSessionNotes();
log.warn(userSessionNotes);
for (Map.Entry<String, String> entry : userSessionNotes.entrySet()) {
log.warn("User Session Note - Key: " + entry.getKey() + ", Value: " + entry.getValue());
if entry.key().equals(EDU_PERSON_ENTITLEMENT) {
if (entry.getKey().equals(EDU_PERSON_ENTITLEMENT)) {
log.warn("Got the entitlement!");
}
}
......@@ -60,7 +62,7 @@ public class CustomAuthenticator implements Authenticator {
// }
// If the user has the required entitlement or didn't log in via the EGI Check-in IdP
context.success();
// context.success();
}
@Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment