Examples of principalId()


Examples of be.c4j.ee.security.realm.AuthenticationInfoBuilder.principalId()

    @Override
    public AuthenticationInfo getAuthenticationInfo(AuthenticationToken token) {

        AuthenticationInfoBuilder authenticationInfoBuilder = new AuthenticationInfoBuilder();
        authenticationInfoBuilder.principalId(principalId++).name(token.getPrincipal().toString());
        // TODO: Change for production. Here we use username as password
        authenticationInfoBuilder.realmName("MyApp").password(token.getPrincipal());

        return authenticationInfoBuilder.build();
    }
View Full Code Here

Examples of be.c4j.ee.security.realm.AuthenticationInfoBuilder.principalId()

        if (principal == null) {
            return null;
        } else {

            AuthenticationInfoBuilder authenticationInfoBuilder = new AuthenticationInfoBuilder();
            authenticationInfoBuilder.principalId(principal.getId()).name(principal.getEmployee().getName());
            authenticationInfoBuilder.password(principal.getPassword()) ;

            authenticationInfoBuilder.addUserInfo(UserInfo.EMPLOYEE_ID, principal.getEmployee().getId());
            if (principal.getEmployee().getDepartment() != null) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.