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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description JwkResponseexec()Executes the call to the REST Service requesting the JWK and processes the response.static io.jans.as.model.crypto.signature.ECDSAPublicKeygetECDSAPublicKey(String jwkSetUrl, String keyId)static io.jans.as.model.crypto.signature.ECDSAPublicKeygetECDSAPublicKey(String jwkSetUrl, String keyId, org.jboss.resteasy.client.jaxrs.ClientHttpEngine engine)StringgetHttpMethod()static io.jans.as.model.crypto.signature.RSAPublicKeygetRSAPublicKey(String jwkSetUri, String keyId)static io.jans.as.model.crypto.signature.RSAPublicKeygetRSAPublicKey(String jwkSetUri, 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
-
-
-
-
Constructor Detail
-
JwkClient
public JwkClient(String url)
Constructs a JSON Web Key (JWK) client by providing a REST url where the validate token service is located.- Parameters:
url- The REST Service location.
-
-
Method Detail
-
getHttpMethod
public String getHttpMethod()
- Specified by:
getHttpMethodin 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(String jwkSetUri, String keyId)
-
getRSAPublicKey
public static io.jans.as.model.crypto.signature.RSAPublicKey getRSAPublicKey(String jwkSetUri, String keyId, org.jboss.resteasy.client.jaxrs.ClientHttpEngine engine)
-
getECDSAPublicKey
public static io.jans.as.model.crypto.signature.ECDSAPublicKey getECDSAPublicKey(String jwkSetUrl, String keyId)
-
-