You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by GitBox <gi...@apache.org> on 2022/08/17 21:41:58 UTC

[GitHub] [directory-scimple] bdemers commented on a diff in pull request #109: Minor changes to Spring example to support support resource filtering

bdemers commented on code in PR #109:
URL: https://github.com/apache/directory-scimple/pull/109#discussion_r948452132


##########
scim-server-examples/scim-server-spring-boot/src/main/java/org/apache/directory/scim/example/spring/ScimpleSpringBootApplication.java:
##########
@@ -19,12 +19,25 @@
 
 package org.apache.directory.scim.example.spring;
 
+import org.apache.directory.scim.server.configuration.ServerConfiguration;
+import org.apache.directory.scim.spec.schema.ServiceProviderConfiguration;
 import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.Bean;
 
-@org.springframework.boot.autoconfigure.SpringBootApplication
-public class SpringBootApplication {
+@SpringBootApplication
+public class ScimpleSpringBootApplication {
 
   public static void main(String[] args) {
-    SpringApplication.run(SpringBootApplication.class, args);
+    SpringApplication.run(ScimpleSpringBootApplication.class, args);
+  }
+
+  @Bean
+  ServerConfiguration serverConfiguration() {
+    return new ServerConfiguration().addAuthenticationSchema(
+      new ServiceProviderConfiguration.AuthenticationSchema()
+      .setType(ServiceProviderConfiguration.AuthenticationSchema.Type.OAUTH_BEARER)
+        .setName(ServiceProviderConfiguration.AuthenticationSchema.Type.OAUTH_BEARER.name())
+        .setDescription("OAuth2 Bearer Token"));

Review Comment:
   This configuration should be injected somehow.
   NOTE: There is still no auth for this example, this is a placeholder to pass said tests (the actual values could be anything)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@directory.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@directory.apache.org
For additional commands, e-mail: dev-help@directory.apache.org