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

org.cloudfoundry.identity.uaa.impl.config.LegacyTokenKey Maven / Gradle / Ivy

There is a newer version: 4.30.0
Show newest version
package org.cloudfoundry.identity.uaa.impl.config;

import org.cloudfoundry.identity.uaa.oauth.KeyInfo;
import org.cloudfoundry.identity.uaa.oauth.KeyInfoBuilder;
import org.springframework.util.StringUtils;

public final class LegacyTokenKey {
    public static final String LEGACY_TOKEN_KEY_ID = "legacy-token-key";
    private static KeyInfo keyInfo;

    private LegacyTokenKey() {
    }

    public static void setLegacySigningKey(String legacySigningKey, String uaaUrl) {
        if (!StringUtils.hasText(legacySigningKey)) {
            return;
        }

        LegacyTokenKey.keyInfo = KeyInfoBuilder.build(LEGACY_TOKEN_KEY_ID, legacySigningKey, uaaUrl);
    }

    public static KeyInfo getLegacyTokenKeyInfo() {
        return keyInfo;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy