Search in sources :

Example 1 with IdentityProviderSyncMode

use of org.keycloak.models.IdentityProviderSyncMode in project keycloak by keycloak.

the class KcOidcBrokerPkceTest method getBrokerConfiguration.

@Override
protected BrokerConfiguration getBrokerConfiguration() {
    return new KcOidcBrokerConfiguration() {

        @Override
        public IdentityProviderRepresentation setUpIdentityProvider(IdentityProviderSyncMode syncMode) {
            IdentityProviderRepresentation provider = super.setUpIdentityProvider(syncMode);
            provider.getConfig().put(OAuth2IdentityProviderConfig.PKCE_ENABLED, "true");
            provider.getConfig().put(OAuth2IdentityProviderConfig.PKCE_METHOD, OAuth2Constants.PKCE_METHOD_S256);
            return provider;
        }
    };
}
Also used : IdentityProviderSyncMode(org.keycloak.models.IdentityProviderSyncMode) IdentityProviderRepresentation(org.keycloak.representations.idm.IdentityProviderRepresentation)

Example 2 with IdentityProviderSyncMode

use of org.keycloak.models.IdentityProviderSyncMode in project keycloak by keycloak.

the class BrokerWithLegacyIdTest method getBrokerConfiguration.

@Override
protected BrokerConfiguration getBrokerConfiguration() {
    return new KcOidcBrokerConfiguration() {

        @Override
        public IdentityProviderRepresentation setUpIdentityProvider(IdentityProviderSyncMode syncMode) {
            IdentityProviderRepresentation idp = super.setUpIdentityProvider(syncMode);
            idp.setProviderId(LegacyIdIdentityProviderFactory.PROVIDER_ID);
            return idp;
        }
    };
}
Also used : IdentityProviderSyncMode(org.keycloak.models.IdentityProviderSyncMode) IdentityProviderRepresentation(org.keycloak.representations.idm.IdentityProviderRepresentation)

Aggregations

IdentityProviderSyncMode (org.keycloak.models.IdentityProviderSyncMode)2 IdentityProviderRepresentation (org.keycloak.representations.idm.IdentityProviderRepresentation)2