
org.pac4j.framework.adapter.FrameworkAdapterImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of buji-pac4j Show documentation
Show all versions of buji-pac4j Show documentation
Bridge from the pac4j security library to Shiro
The newest version!
package org.pac4j.framework.adapter;
import io.buji.pac4j.context.ShiroSessionStore;
import io.buji.pac4j.profile.ShiroProfileManager;
import org.pac4j.core.config.Config;
import org.pac4j.core.util.CommonHelper;
import org.pac4j.jee.adapter.JEEFrameworkAdapter;
/**
* Shiro adapter.
*
* @author Jerome LELEU
* @since 9.0.0
*/
public class FrameworkAdapterImpl extends JEEFrameworkAdapter {
@Override
public void applyDefaultSettingsIfUndefined(final Config config) {
CommonHelper.assertNotNull("config", config);
config.setProfileManagerFactoryIfUndefined((ctx, session) -> new ShiroProfileManager(ctx, session));
config.setSessionStoreFactoryIfUndefined(p -> ShiroSessionStore.INSTANCE);
super.applyDefaultSettingsIfUndefined(config);
}
@Override
public String toString() {
return "Shiro";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy