io.vrap.rmf.base.client.oauth2.StaticTokenSupplier Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rmf-java-base Show documentation
Show all versions of rmf-java-base Show documentation
The e-commerce SDK from commercetools Composable Commerce for Java
package io.vrap.rmf.base.client.oauth2;
import java.util.concurrent.CompletableFuture;
import io.vrap.rmf.base.client.AuthenticationToken;
/**
* Token supplier using a specified token
*/
public class StaticTokenSupplier implements TokenSupplier {
private final AuthenticationToken token;
public StaticTokenSupplier(final AuthenticationToken token) {
this.token = token;
}
@Override
public CompletableFuture getToken() {
return CompletableFuture.completedFuture(this.token);
}
}