We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8d7412 commit 0b14b0dCopy full SHA for 0b14b0d
services-api/src/main/java/io/scalecube/services/auth/CredentialsSuppliers.java
@@ -0,0 +1,17 @@
1
+package io.scalecube.services.auth;
2
+
3
+import java.util.List;
4
5
+public class CredentialsSuppliers {
6
7
+ private final CredentialsSupplier credentialsSupplier;
8
9
+ public CredentialsSuppliers(CredentialsSupplier credentialsSupplier) {
10
+ this.credentialsSupplier = credentialsSupplier;
11
+ }
12
13
+ public CredentialsSupplier forServiceRole(String serviceRole) {
14
+ return (service, allowedRoles) ->
15
+ credentialsSupplier.credentials(service, List.of(serviceRole));
16
17
+}
0 commit comments