Package org.keycloak.adapters

Examples of org.keycloak.adapters.KeycloakAccount


    @Override
    protected void completeOAuthAuthentication(final KeycloakPrincipal<RefreshableKeycloakSecurityContext> skp) {
        final RefreshableKeycloakSecurityContext securityContext = skp.getKeycloakSecurityContext();
        final Set<String> roles = AdapterUtils.getRolesFromSecurityContext(securityContext);
        KeycloakAccount account = new KeycloakAccount() {

            @Override
            public Principal getPrincipal() {
                return skp;
            }
View Full Code Here


    @Override
    protected void completeOAuthAuthentication(final KeycloakPrincipal<RefreshableKeycloakSecurityContext> skp) {
        final RefreshableKeycloakSecurityContext securityContext = skp.getKeycloakSecurityContext();
        final Set<String> roles = AdapterUtils.getRolesFromSecurityContext(securityContext);
        KeycloakAccount account = new KeycloakAccount() {

            @Override
            public Principal getPrincipal() {
                return skp;
            }
View Full Code Here

* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
*/
public class CatalinaSecurityContextHelper {
    public GenericPrincipal createPrincipal(Realm realm, final Principal identity, final Set<String> roleSet, final KeycloakSecurityContext securityContext) {
        KeycloakAccount account = new KeycloakAccount() {
            @Override
            public Principal getPrincipal() {
                return identity;
            }

View Full Code Here

        }

        Object credential = getCredential();
        if (credential != null && (credential instanceof KeycloakAccount)) {
            log.debug("Found Account");
            KeycloakAccount account = (KeycloakAccount)credential;
            roleSet = account.getRoles();
            identity = account.getPrincipal();
            sharedState.put("javax.security.auth.login.name", identity);
            sharedState.put("javax.security.auth.login.password", credential);
            loginOk = true;
            return true;
        }
View Full Code Here

TOP

Related Classes of org.keycloak.adapters.KeycloakAccount

Copyright © 2018 www.massapicom. 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.