Search in sources :

Example 1 with ClientRegistrationProvider

use of org.keycloak.services.clientregistration.ClientRegistrationProvider in project keycloak by keycloak.

the class ClientRegistrationPolicyManager method triggerPolicies.

private static void triggerPolicies(KeycloakSession session, ClientRegistrationProvider provider, RegistrationAuth authType, String opDescription, ClientRegOperation op) throws ClientRegistrationPolicyException {
    RealmModel realm = session.getContext().getRealm();
    String policyTypeKey = getComponentTypeKey(authType);
    realm.getComponentsStream(realm.getId(), ClientRegistrationPolicy.class.getName()).filter(componentModel -> Objects.equals(componentModel.getSubType(), policyTypeKey)).forEach(policyModel -> runPolicy(policyModel, session, provider, opDescription, op));
}
Also used : RealmModel(org.keycloak.models.RealmModel) Objects(java.util.Objects) ClientModel(org.keycloak.models.ClientModel) ClientRegistrationProvider(org.keycloak.services.clientregistration.ClientRegistrationProvider) RealmModel(org.keycloak.models.RealmModel) Details(org.keycloak.events.Details) ClientRegistrationContext(org.keycloak.services.clientregistration.ClientRegistrationContext) Logger(org.jboss.logging.Logger) ComponentModel(org.keycloak.component.ComponentModel) KeycloakSession(org.keycloak.models.KeycloakSession) ServicesLogger(org.keycloak.services.ServicesLogger)

Aggregations

Objects (java.util.Objects)1 Logger (org.jboss.logging.Logger)1 ComponentModel (org.keycloak.component.ComponentModel)1 Details (org.keycloak.events.Details)1 ClientModel (org.keycloak.models.ClientModel)1 KeycloakSession (org.keycloak.models.KeycloakSession)1 RealmModel (org.keycloak.models.RealmModel)1 ServicesLogger (org.keycloak.services.ServicesLogger)1 ClientRegistrationContext (org.keycloak.services.clientregistration.ClientRegistrationContext)1 ClientRegistrationProvider (org.keycloak.services.clientregistration.ClientRegistrationProvider)1