Search in sources :

Example 1 with AuthenticationScheme

use of org.apache.syncope.ext.scimv2.api.data.AuthenticationScheme in project syncope by apache.

the class SCIMLogic method serviceProviderConfig.

@PreAuthorize("isAuthenticated()")
public ServiceProviderConfig serviceProviderConfig(final UriBuilder uriBuilder) {
    synchronized (MONITOR) {
        if (SCHEMAS == null) {
            init();
        }
        if (SERVICE_PROVIDER_CONFIG == null) {
            SCIMConf conf = confManager.get();
            SERVICE_PROVIDER_CONFIG = new ServiceProviderConfig(new Meta(Resource.ServiceProviderConfig, conf.getCreationDate(), conf.getLastChangeDate(), conf.getETagValue(), uriBuilder.build().toASCIIString()), new ConfigurationOption(false), new BulkConfigurationOption(false, conf.getBulkMaxOperations(), conf.getBulkMaxPayloadSize()), new FilterConfigurationOption(true, conf.getFilterMaxResults()), new ConfigurationOption(true), new ConfigurationOption(true), new ConfigurationOption(true));
            SERVICE_PROVIDER_CONFIG.getAuthenticationSchemes().add(new AuthenticationScheme("JSON Web Token", "Apache Syncope JWT authentication", URI.create("http://www.rfc-editor.org/info/rfc6750"), URI.create("https://syncope.apache.org/docs/" + "reference-guide.html#rest-authentication-and-authorization"), "oauthbearertoken", true));
            SERVICE_PROVIDER_CONFIG.getAuthenticationSchemes().add(new AuthenticationScheme("HTTP Basic", "Apache Syncope HTTP Basic authentication", URI.create("http://www.rfc-editor.org/info/rfc2617"), URI.create("https://syncope.apache.org/docs/" + "reference-guide.html#rest-authentication-and-authorization"), "httpbasic", false));
        }
    }
    return SERVICE_PROVIDER_CONFIG;
}
Also used : AuthenticationScheme(org.apache.syncope.ext.scimv2.api.data.AuthenticationScheme) ServiceProviderConfig(org.apache.syncope.ext.scimv2.api.data.ServiceProviderConfig) Meta(org.apache.syncope.ext.scimv2.api.data.Meta) FilterConfigurationOption(org.apache.syncope.ext.scimv2.api.data.FilterConfigurationOption) BulkConfigurationOption(org.apache.syncope.ext.scimv2.api.data.BulkConfigurationOption) ConfigurationOption(org.apache.syncope.ext.scimv2.api.data.ConfigurationOption) FilterConfigurationOption(org.apache.syncope.ext.scimv2.api.data.FilterConfigurationOption) BulkConfigurationOption(org.apache.syncope.ext.scimv2.api.data.BulkConfigurationOption) SCIMConf(org.apache.syncope.common.lib.scim.SCIMConf) PreAuthorize(org.springframework.security.access.prepost.PreAuthorize)

Aggregations

SCIMConf (org.apache.syncope.common.lib.scim.SCIMConf)1 AuthenticationScheme (org.apache.syncope.ext.scimv2.api.data.AuthenticationScheme)1 BulkConfigurationOption (org.apache.syncope.ext.scimv2.api.data.BulkConfigurationOption)1 ConfigurationOption (org.apache.syncope.ext.scimv2.api.data.ConfigurationOption)1 FilterConfigurationOption (org.apache.syncope.ext.scimv2.api.data.FilterConfigurationOption)1 Meta (org.apache.syncope.ext.scimv2.api.data.Meta)1 ServiceProviderConfig (org.apache.syncope.ext.scimv2.api.data.ServiceProviderConfig)1 PreAuthorize (org.springframework.security.access.prepost.PreAuthorize)1