org.pac4j.core.profile.ProfileHelper Java Examples

The following examples show how to use org.pac4j.core.profile.ProfileHelper. 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 File: ClientAction.java    From springboot-shiro-cas-mybatis with 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 File: ClientAction.java    From cas4.0.x-server-wechat with 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 File: JaxRsProfileManager.java    From jax-rs-pac4j with 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 File: RequestCommonProfile.java    From jax-rs-pac4j with 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 File: Pac4JHttpServletRequestWrapper.java    From jee-pac4j with Apache License 2.0 4 votes vote down vote up
private Optional<UserProfile> getProfile() {
    return ProfileHelper.flatIntoOneProfile(profiles);
}