Java Code Examples for org.pac4j.core.profile.ProfileHelper

The following examples show how to use org.pac4j.core.profile.ProfileHelper. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: springboot-shiro-cas-mybatis   Source File: ClientAction.java    License: MIT License 5 votes vote down vote up
/**
 * Build the action.
 *
 * @param theCentralAuthenticationService The service for CAS authentication
 * @param theClients The clients for authentication
 */
public ClientAction(final CentralAuthenticationService theCentralAuthenticationService,
        final Clients theClients) {
    this.centralAuthenticationService = theCentralAuthenticationService;
    this.clients = theClients;
    ProfileHelper.setKeepRawData(true);
}
 
Example 2
Source Project: cas4.0.x-server-wechat   Source File: ClientAction.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Build the action.
 *
 * @param theCentralAuthenticationService The service for CAS authentication
 * @param theClients The clients for authentication
 */
public ClientAction(final CentralAuthenticationService theCentralAuthenticationService,
        final Clients theClients) {
    this.centralAuthenticationService = theCentralAuthenticationService;
    this.clients = theClients;
    ProfileHelper.setKeepRawData(true);
}
 
Example 3
Source Project: jax-rs-pac4j   Source File: JaxRsProfileManager.java    License: Apache License 2.0 5 votes vote down vote up
public Pac4JSecurityContext(SecurityContext original, JaxRsContext context,
        Collection<CommonProfile> profiles) {
    this.original = original;
    this.context = context;
    this.profiles = profiles;
    this.principal = ProfileHelper.flatIntoOneProfile(profiles).map(Pac4JPrincipal::new).orElse(null);
}
 
Example 4
Source Project: jax-rs-pac4j   Source File: RequestCommonProfile.java    License: Apache License 2.0 4 votes vote down vote up
public Optional<CommonProfile> profile() {
    return context.context()
            .flatMap(Pac4JSecurityContext::getProfiles)
            .flatMap(ps -> ProfileHelper.flatIntoOneProfile(ps));
}
 
Example 5
Source Project: jee-pac4j   Source File: Pac4JHttpServletRequestWrapper.java    License: Apache License 2.0 4 votes vote down vote up
private Optional<UserProfile> getProfile() {
    return ProfileHelper.flatIntoOneProfile(profiles);
}