All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sap.cloud.sdk.cloudplatform.security.RefreshTokenFacade Maven / Gradle / Ivy

/*
 * Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
 */

package com.sap.cloud.sdk.cloudplatform.security;

import java.util.concurrent.Future;

import javax.annotation.Nonnull;

import com.auth0.jwt.interfaces.DecodedJWT;

/**
 * Facade for triggering the refresh token retrieval and subsequent access to it. Used by the AuthTokenAccessor.
 */
public class RefreshTokenFacade
{
    /**
     * Returns a future that resolves to a refresh token.
     *
     * @return A future that resolves to a refresh token.
     */
    @Nonnull
    Future getRefreshToken( @Nonnull final DecodedJWT jwt )
    {
        return new RefreshTokenRetrievalCommand(jwt).queue();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy