Skip to content

Commit 3ffdd65

Browse files
committed
Renamed CompositeAuthenticator -> RegistryBasedAuthenticator
1 parent 08a5326 commit 3ffdd65

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed
Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,18 @@
1010
* Internally maintains a map of service claims where key is some id (of type {@code long}) and
1111
* value is {@link ServiceClaims} object.
1212
*
13-
* @see #saveAuthData(long, ServiceClaims)
14-
* @see #getAuthData(long)
15-
* @see #removeAuthData(long)
13+
* @see #put(long, ServiceClaims)
14+
* @see #get(long)
15+
* @see #remove(long)
16+
* @see #containsKey(long)
1617
*/
17-
public final class CompositeAuthenticator implements Authenticator<ServiceClaims> {
18+
public final class RegistryBasedAuthenticator implements Authenticator<ServiceClaims> {
1819

1920
private final Authenticator<ServiceClaims> authenticator;
2021

2122
private final Map<Long, ServiceClaims> registry = new NonBlockingHashMapLong<>();
2223

23-
public CompositeAuthenticator(Authenticator<ServiceClaims> authenticator) {
24+
public RegistryBasedAuthenticator(Authenticator<ServiceClaims> authenticator) {
2425
this.authenticator = authenticator;
2526
}
2627

@@ -29,19 +30,19 @@ public Mono<ServiceClaims> apply(Map<String, String> credentials) {
2930
return authenticator.apply(credentials);
3031
}
3132

32-
public void saveAuthData(long id, ServiceClaims serviceClaims) {
33+
public void put(long id, ServiceClaims serviceClaims) {
3334
registry.put(id, serviceClaims);
3435
}
3536

36-
public ServiceClaims getAuthData(long id) {
37+
public ServiceClaims get(long id) {
3738
return registry.get(id);
3839
}
3940

40-
public void removeAuthData(long id) {
41+
public void remove(long id) {
4142
registry.remove(id);
4243
}
4344

44-
public boolean containsAuthData(long id) {
45+
public boolean containsKey(long id) {
4546
return registry.containsKey(id);
4647
}
4748
}

0 commit comments

Comments
 (0)