pl.allegro.tech.hermes.consumers.consumer.oauth.client.OAuthTokenResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hermes-consumers Show documentation
Show all versions of hermes-consumers Show documentation
Fast and reliable message broker built on top of Kafka.
package pl.allegro.tech.hermes.consumers.consumer.oauth.client;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import jakarta.validation.constraints.NotEmpty;
import pl.allegro.tech.hermes.consumers.consumer.oauth.OAuthAccessToken;
public class OAuthTokenResponse {
@NotEmpty
private final String accessToken;
private final Integer expiresIn;
@JsonCreator
public OAuthTokenResponse(@JsonProperty("access_token") String accessToken,
@JsonProperty("expires_in") Integer expiresIn) {
this.accessToken = accessToken;
this.expiresIn = expiresIn;
}
public OAuthAccessToken toAccessToken() {
return new OAuthAccessToken(accessToken, expiresIn);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy