-
-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #735 from scalecube/get-rid-of-principal
Get rid of @principal
- Loading branch information
Showing
19 changed files
with
411 additions
and
427 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 7 additions & 11 deletions
18
services-api/src/main/java/io/scalecube/services/auth/Authenticator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,16 @@ | ||
package io.scalecube.services.auth; | ||
|
||
import io.scalecube.services.api.ServiceMessage; | ||
import java.util.Map; | ||
import reactor.core.publisher.Mono; | ||
|
||
/** | ||
* Authenticator. | ||
* | ||
* @param <P> principal type | ||
*/ | ||
public interface Authenticator<P> { | ||
@FunctionalInterface | ||
public interface Authenticator { | ||
|
||
/** | ||
* Returns principal by given credentials. | ||
* Returns {@code authData} by given credentials. | ||
* | ||
* @param message service message | ||
* @return async result with obtained principal | ||
* @param credentials credentials | ||
* @return async result with obtained {@code authData} | ||
*/ | ||
Mono<P> authenticate(ServiceMessage message); | ||
Mono<Map<String, String>> authenticate(Map<String, String> credentials); | ||
} |
14 changes: 0 additions & 14 deletions
14
services-api/src/main/java/io/scalecube/services/auth/Principal.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.