fi.metatavu.wso2.keycloak.Wso2OidcKeycloakAccount Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of keycloak-mediator Show documentation
Show all versions of keycloak-mediator Show documentation
WSO2 mediator for validating Bearer tokens
The newest version!
package fi.metatavu.wso2.keycloak;
import java.security.Principal;
import java.util.Set;
import org.keycloak.KeycloakSecurityContext;
import org.keycloak.adapters.OidcKeycloakAccount;
/**
* WSO2 mediator implementation of Keycloak account.
*
* @author Antti Leppä
*/
public class Wso2OidcKeycloakAccount implements OidcKeycloakAccount {
private Principal principal;
private Set roles;
private KeycloakSecurityContext keycloakSecurityContext;
/**
* Constructor
*
* @param principal principal
* @param roles roles
* @param keycloakSecurityContext context
*/
public Wso2OidcKeycloakAccount(Principal principal, Set roles, KeycloakSecurityContext keycloakSecurityContext) {
super();
this.principal = principal;
this.roles = roles;
this.keycloakSecurityContext = keycloakSecurityContext;
}
/**
* Returns principal
*
* @return principal
*/
public Principal getPrincipal() {
return principal;
}
/**
* Returns roles
*
* @return roles
*/
public Set getRoles() {
return roles;
}
/**
* Returns security context
*
* @return security context
*/
public KeycloakSecurityContext getKeycloakSecurityContext() {
return keycloakSecurityContext;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy