org.sdase.commons.server.auth.config.KeyLocation Maven / Gradle / Ivy
package org.sdase.commons.server.auth.config;
import java.net.URI;
/** Defines a location of keys. */
public class KeyLocation {
/**
* Uri leading to
*
*
* - a JSON Web Key Set,
*
- a OpenID provider base Uri or
*
- a key file in PEM format.
*
*
* The type of the Uri depends on the {@link #type}.
*
*
Further information:
*
*
*/
private URI location;
/** The type of the {@link #location} that defines how the certificate is loaded. */
private KeyUriType type;
/**
* Optional Key
* Id used only if the {@link #type} is {@link KeyUriType#PEM}.
*/
private String pemKeyId;
/**
* Optional signing
* algorithm used only if the {@link #type} is {@link KeyUriType#PEM}. If not set, RS265 is
* expected.
*/
private String pemSignAlg;
/**
* Optional iss that
* specifies the required issuer of the jwt token, if not empty.
*/
private String requiredIssuer;
public URI getLocation() {
return location;
}
public KeyLocation setLocation(URI location) {
this.location = location;
return this;
}
public KeyUriType getType() {
return type;
}
public KeyLocation setType(KeyUriType type) {
this.type = type;
return this;
}
public String getPemKeyId() {
return pemKeyId;
}
public KeyLocation setPemKeyId(String pemKeyId) {
this.pemKeyId = pemKeyId;
return this;
}
public String getRequiredIssuer() {
return requiredIssuer;
}
public KeyLocation setRequiredIssuer(String requiredIssuer) {
this.requiredIssuer = requiredIssuer;
return this;
}
public String getPemSignAlg() {
return pemSignAlg;
}
public KeyLocation setPemSignAlg(String pemSignAlg) {
this.pemSignAlg = pemSignAlg;
return this;
}
}