authentication.extensionapp.InMemoryTokensRepository Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of symphony-api-client-java Show documentation
Show all versions of symphony-api-client-java Show documentation
Symphony API Client provided by Symphony Platform Solutions team
package authentication.extensionapp;
import model.AppAuthResponse;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.ConcurrentHashMap;
public class InMemoryTokensRepository implements TokensRepository {
private final Map tokens = new ConcurrentHashMap<>();
@Override
public AppAuthResponse save(AppAuthResponse appAuthResponse) {
tokens.put(appAuthResponse.getAppToken(), appAuthResponse);
return appAuthResponse;
}
@Override
public Optional get(String appToken) {
return Optional.of(tokens.get(appToken));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy