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

uk.gov.ida.saml.metadata.EncodedTrustStoreConfiguration Maven / Gradle / Ivy

There is a newer version: 3.4.6-277
Show newest version
package uk.gov.ida.saml.metadata;

import com.fasterxml.jackson.annotation.JsonProperty;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.io.ByteArrayInputStream;
import java.security.KeyStore;
import java.util.Base64;

public class EncodedTrustStoreConfiguration extends TrustStoreConfiguration {

    @Valid
    @NotNull
    @JsonProperty
    private String store;

    @Override
    public KeyStore getTrustStore() {
        return new KeyStoreLoader().load(new ByteArrayInputStream(Base64.getDecoder().decode(store)), trustStorePassword);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy