Package io.jans.as.client
Class JwkClient
- java.lang.Object
-
- io.jans.as.client.BaseClient<JwkRequest,JwkResponse>
-
- io.jans.as.client.JwkClient
-
public class JwkClient extends BaseClient<JwkRequest,JwkResponse>
Encapsulates functionality to make JWK request calls to an authorization server via REST Services.- Version:
- December 26, 2016
- Author:
- Javier Rojas Blum
-
-
Field Summary
-
Fields inherited from class io.jans.as.client.BaseClient
clientResponse, executor, request, requestForm, response, resteasyClient, webTarget
-
-
Constructor Summary
Constructors Constructor Description JwkClient(java.lang.String url)
Constructs a JSON Web Key (JWK) client by providing a REST url where the validate token service is located.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description JwkResponse
exec()
Executes the call to the REST Service requesting the JWK and processes the response.static io.jans.as.model.crypto.signature.ECDSAPublicKey
getECDSAPublicKey(java.lang.String jwkSetUrl, java.lang.String keyId)
static io.jans.as.model.crypto.signature.ECDSAPublicKey
getECDSAPublicKey(java.lang.String jwkSetUrl, java.lang.String keyId, org.jboss.resteasy.client.jaxrs.ClientHttpEngine engine)
java.lang.String
getHttpMethod()
static io.jans.as.model.crypto.signature.RSAPublicKey
getRSAPublicKey(java.lang.String jwkSetUri, java.lang.String keyId)
static io.jans.as.model.crypto.signature.RSAPublicKey
getRSAPublicKey(java.lang.String jwkSetUri, java.lang.String keyId, org.jboss.resteasy.client.jaxrs.ClientHttpEngine engine)
-
Methods inherited from class io.jans.as.client.BaseClient
addReqParam, addReqParam, applyCookies, closeConnection, getCookies, getExecutor, getHeaders, getRequest, getRequestAsString, getResponse, getResponseAsString, getUrl, initClient, prepareAuthorizatedClientRequest, setExecutor, setRequest, setResponse, setUrl
-
-
-
-
Method Detail
-
getHttpMethod
public java.lang.String getHttpMethod()
- Specified by:
getHttpMethod
in classBaseClient<JwkRequest,JwkResponse>
-
exec
public JwkResponse exec()
Executes the call to the REST Service requesting the JWK and processes the response.- Returns:
- The service response.
-
getRSAPublicKey
public static io.jans.as.model.crypto.signature.RSAPublicKey getRSAPublicKey(java.lang.String jwkSetUri, java.lang.String keyId)
-
getRSAPublicKey
public static io.jans.as.model.crypto.signature.RSAPublicKey getRSAPublicKey(java.lang.String jwkSetUri, java.lang.String keyId, org.jboss.resteasy.client.jaxrs.ClientHttpEngine engine)
-
getECDSAPublicKey
public static io.jans.as.model.crypto.signature.ECDSAPublicKey getECDSAPublicKey(java.lang.String jwkSetUrl, java.lang.String keyId)
-
getECDSAPublicKey
public static io.jans.as.model.crypto.signature.ECDSAPublicKey getECDSAPublicKey(java.lang.String jwkSetUrl, java.lang.String keyId, org.jboss.resteasy.client.jaxrs.ClientHttpEngine engine)
-
-