Skip to content

Commit

Permalink
update to pac4j v6.0.0-RC10
Browse files Browse the repository at this point in the history
  • Loading branch information
leleuj committed Nov 24, 2023
1 parent 23a8d86 commit b75a9da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

<properties>
<javalin.version>5.6.2</javalin.version>
<pac4j.version>6.0.0-RC9</pac4j.version>
<pac4j.version>6.0.0-RC10</pac4j.version>
<java.version>17</java.version>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@
import java.util.List;
import java.util.Optional;

import static io.javalin.apibuilder.ApiBuilder.before;
import static io.javalin.apibuilder.ApiBuilder.get;
import static io.javalin.apibuilder.ApiBuilder.post;
import static io.javalin.apibuilder.ApiBuilder.*;
import static io.javalin.rendering.template.TemplateUtil.model;

public class JavalinPac4jExample {
Expand Down Expand Up @@ -128,7 +126,7 @@ private static void index(Context ctx, Config config) {
}

private static void jwt(Context ctx) {
ProfileManager manager = new ProfileManager(new JEEContext(ctx.req(), ctx.res()), JEESessionStore.INSTANCE);
ProfileManager manager = new ProfileManager(new JEEContext(ctx.req(), ctx.res()), new JEESessionStore());
Optional<CommonProfile> profile = manager.getProfile(CommonProfile.class);
String token = "";
if (profile.isPresent()) {
Expand Down Expand Up @@ -168,7 +166,7 @@ private static void forceLogin(Context ctx, Config config) {

HttpAction action;
try {
action = client.getRedirectionAction(new CallContext(context, JEESessionStore.INSTANCE)).get();
action = client.getRedirectionAction(new CallContext(context, new JEESessionStore())).get();
} catch (HttpAction e) {
action = e;
}
Expand Down

0 comments on commit b75a9da

Please sign in to comment.