public class JWTIssuerConfig extends Object
Modifier and Type | Class and Description |
---|---|
static class |
JWTIssuerConfig.WellKnownDiscoveryConfig
Config object for a OpenId Connect well-known config
Typically exposed through /.well-known/openid-configuration endpoint
|
Modifier and Type | Field and Description |
---|---|
static boolean |
ALLOW_OUTBOUND_HTTP |
static String |
ALLOW_OUTBOUND_HTTP_ERR_MSG |
Constructor and Description |
---|
JWTIssuerConfig(Map<String,Object> configMap)
Initialize issuer config from a generic configuration map
|
JWTIssuerConfig(String name)
Create config for further configuration with setters, builder style.
|
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
asConfig() |
static void |
checkAllowOutboundHttpConnections(String parameterName,
URL url) |
String |
getAud() |
String |
getAuthorizationEndpoint() |
String |
getClientId() |
List<org.jose4j.jwk.HttpsJwks> |
getHttpsJwks() |
String |
getIss() |
org.jose4j.jwk.JsonWebKeySet |
getJsonWebKeySet() |
List<String> |
getJwksUrls() |
String |
getName() |
JWTIssuerConfig.WellKnownDiscoveryConfig |
getWellKnownDiscoveryConfig() |
String |
getWellKnownUrl() |
void |
init()
Call this to validate and initialize an object which is populated with setters.
|
boolean |
isValid()
Validates that this config has a name and either jwksUrl, wellkKownUrl or jwk
|
protected void |
parseConfigMap(Map<String,Object> configMap)
Parses configuration for one IssuerConfig and sets all variables found
|
protected static org.jose4j.jwk.JsonWebKeySet |
parseJwkSet(Map<String,Object> jwkObj) |
JWTIssuerConfig |
setAud(String aud) |
JWTIssuerConfig |
setAuthorizationEndpoint(String authorizationEndpoint) |
JWTIssuerConfig |
setClientId(String clientId) |
static void |
setHttpsJwksFactory(org.apache.solr.security.JWTIssuerConfig.HttpsJwksFactory httpsJwksFactory)
Set the factory to use when creating HttpsJwks objects
|
JWTIssuerConfig |
setIss(String iss) |
JWTIssuerConfig |
setJsonWebKeySet(org.jose4j.jwk.JsonWebKeySet jsonWebKeySet) |
protected void |
setJsonWebKeySet(Object jwksObject)
Setter that takes a jwk config object, parses it into a
JsonWebKeySet and sets it |
JWTIssuerConfig |
setJwksUrl(List<String> jwksUrl) |
JWTIssuerConfig |
setJwksUrl(Object jwksUrlListOrString)
Setter that converts from String or List into a list
|
JWTIssuerConfig |
setName(String name) |
JWTIssuerConfig |
setWellKnownUrl(String wellKnownUrl) |
boolean |
usesHttpsJwk()
Check if the issuer is backed by HttpsJwk url(s)
|
public static boolean ALLOW_OUTBOUND_HTTP
public static final String ALLOW_OUTBOUND_HTTP_ERR_MSG
public JWTIssuerConfig(String name)
init()
before further usename
- a unique name for this issuerpublic void init()
SolrException
- if issuer is missingprotected void parseConfigMap(Map<String,Object> configMap)
SolrException
- if unknown parameter names found in configprotected void setJsonWebKeySet(Object jwksObject)
JsonWebKeySet
and sets itjwksObject
- the config object to parseprotected static org.jose4j.jwk.JsonWebKeySet parseJwkSet(Map<String,Object> jwkObj) throws org.jose4j.lang.JoseException
org.jose4j.lang.JoseException
public String getIss()
public JWTIssuerConfig setIss(String iss)
public String getName()
public JWTIssuerConfig setName(String name)
public String getWellKnownUrl()
public JWTIssuerConfig setWellKnownUrl(String wellKnownUrl)
public JWTIssuerConfig setJwksUrl(List<String> jwksUrl)
public JWTIssuerConfig setJwksUrl(Object jwksUrlListOrString)
jwksUrlListOrString
- object that should be either string or listSolrException
- if wrong typepublic List<org.jose4j.jwk.HttpsJwks> getHttpsJwks()
public static void setHttpsJwksFactory(org.apache.solr.security.JWTIssuerConfig.HttpsJwksFactory httpsJwksFactory)
httpsJwksFactory
- factory with custom settingspublic org.jose4j.jwk.JsonWebKeySet getJsonWebKeySet()
public JWTIssuerConfig setJsonWebKeySet(org.jose4j.jwk.JsonWebKeySet jsonWebKeySet)
public boolean usesHttpsJwk()
public JWTIssuerConfig.WellKnownDiscoveryConfig getWellKnownDiscoveryConfig()
public String getAud()
public JWTIssuerConfig setAud(String aud)
public String getClientId()
public JWTIssuerConfig setClientId(String clientId)
public String getAuthorizationEndpoint()
public JWTIssuerConfig setAuthorizationEndpoint(String authorizationEndpoint)
public boolean isValid()
SolrException
- if configuration is present but wrongCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.