modules/jooby-pac4j2/src/main/java/org/jooby/pac4j/Pac4j.java
public Pac4j unauthenticated(Supplier<UserProfile> provider) {
    requireNonNull(provider, "Unauthenticated provider required.");
    return unauthenticated(req -> provider.get());
  }
public Pac4j unauthenticated(Supplier<UserProfile> provider) {
    requireNonNull(provider, "Unauthenticated provider required.");
    return unauthenticated(req -> provider.get());
  }
Set a default action which is execute when no user is logged in.

<pre>{@code
{
use(new Pac4j()
.unauthenticated(() -> {
UserProfile anonymous = ...
return anonymous;
})
);

get("/", () -> {
// might or might not be anonymous
UserProfile profile = require(UserProfile.class);
return ...;
}
}
}</pre>

The default action throws a <code>403</code> error.


@param provider Unauthenticated user provider.
@return This module.