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

com.stormpath.sdk.impl.okta.DefaultOIDCKey Maven / Gradle / Ivy

Go to download

The Stormpath Java SDK core implemenation .jar is used at runtime to support API invocations. This implementation jar should be a runtime dependency only and should NOT be depended on at compile time by your code. The implementations within this jar can change at any time without warning - use it with runtime scope only.

There is a newer version: 2.0.4-okta
Show newest version
package com.stormpath.sdk.impl.okta;

import com.stormpath.sdk.okta.OIDCKey;
import com.stormpath.sdk.impl.ds.InternalDataStore;
import com.stormpath.sdk.impl.resource.AbstractInstanceResource;
import com.stormpath.sdk.impl.resource.Property;
import com.stormpath.sdk.impl.resource.StringProperty;

import java.util.Map;

/**
 *
 */
public class DefaultOIDCKey extends AbstractInstanceResource implements OIDCKey {

    private static final StringProperty ALGORITHM = new StringProperty("alg");
    private static final StringProperty TYPE = new StringProperty("kty");
    private static final StringProperty USE = new StringProperty("use");
    private static final StringProperty ID = new StringProperty("kid");

    private static final Map PROPERTY_DESCRIPTORS = createPropertyDescriptorMap(ALGORITHM);

    public DefaultOIDCKey(InternalDataStore dataStore, Map properties) {
        super(dataStore, properties);
    }

    @Override
    public Map getPropertyDescriptors() {
        return PROPERTY_DESCRIPTORS;
    }

    @Override
    public String getAlgorithm() {
        return getString(ALGORITHM);
    }

    @Override
    public String getId() {
        return getString(ID);
    }

    @Override
    public String getType() {
        return getString(TYPE);
    }

    @Override
    public String getUse() {
        return getString(USE);
    }

    @Override
    public String get(String id) {
        return getStringProperty(id);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy