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

com.sap.cloud.sdk.cloudplatform.connectivity.SubdomainReplacer Maven / Gradle / Ivy

Go to download

Implementation of the Cloud platform abstraction for general-purpose connectivity on the SAP Cloud Platform (Cloud Foundry).

The newest version!
/*
 * Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
 */

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

import java.net.URI;

import javax.annotation.Nonnull;

/**
 * A class that implements this interface can be passed to the {@link XsuaaService} to control how differing tenant
 * specific subdomains of issuer URLs from JWTs and XSUAA URLs should be handled.
 * 
 * By default, the SDK uses the {@link DefaultSubdomainReplacer}.
 */
public interface SubdomainReplacer
{
    /**
     * This function takes the issuer URL from the user's JWT and the XSUAA URL and returns a new XSUAA URL.
     * 
     * @param issuerUrl
     *            The URL of the service that issued the user's JWT.
     * @param xsuaaUrl
     *            The URL of XSUAA instance that should be used to retrieve access tokens.
     * @return A new XSUAA URL.
     */
    @Nonnull
    URI replaceSubdomain( @Nonnull final String issuerUrl, @Nonnull final URI xsuaaUrl );
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy