Package io.jans.as.client
Class BaseClient<T extends BaseRequest,V extends BaseResponse>
- java.lang.Object
-
- io.jans.as.client.BaseClient<T,V>
-
- Direct Known Subclasses:
AuthorizeClient
,BackchannelAuthenticationClient
,ClientInfoClient
,DeviceAuthzClient
,EndSessionClient
,FirebaseCloudMessagingClient
,GluuConfigurationClient
,JwkClient
,OpenIdConfigurationClient
,OpenIdConnectDiscoveryClient
,ParClient
,PingCallbackClient
,PushErrorClient
,PushTokenDeliveryClient
,RegisterClient
,RevokeSessionClient
,SsaCreateClient
,SsaGetClient
,SsaGetJwtClient
,SsaRevokeClient
,SsaValidateClient
,TokenClient
,TokenRevocationClient
,UserInfoClient
public abstract class BaseClient<T extends BaseRequest,V extends BaseResponse> extends Object
Allows to retrieve HTTP requests to the authorization server and responses from it for display purposes.- Version:
- October 5, 2021
- Author:
- Javier Rojas Blum
-
-
Field Summary
Fields Modifier and Type Field Description protected jakarta.ws.rs.core.Response
clientResponse
protected org.jboss.resteasy.client.jaxrs.ClientHttpEngine
executor
protected T
request
protected jakarta.ws.rs.core.Form
requestForm
protected V
response
protected org.jboss.resteasy.client.jaxrs.ResteasyClient
resteasyClient
protected jakarta.ws.rs.client.WebTarget
webTarget
-
Constructor Summary
Constructors Modifier Constructor Description protected
BaseClient()
protected
BaseClient(String url)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
addReqParam(String key, io.jans.as.model.common.HasParamName value)
protected void
addReqParam(String key, String value)
protected void
applyCookies(jakarta.ws.rs.client.Invocation.Builder clientRequest)
void
closeConnection()
List<jakarta.ws.rs.core.Cookie>
getCookies()
org.jboss.resteasy.client.jaxrs.ClientHttpEngine
getExecutor()
Map<String,String>
getHeaders()
abstract String
getHttpMethod()
T
getRequest()
String
getRequestAsString()
V
getResponse()
String
getResponseAsString()
String
getUrl()
protected void
initClient()
protected jakarta.ws.rs.client.Invocation.Builder
prepareAuthorizatedClientRequest(io.jans.as.model.common.AuthorizationMethod authorizationMethod, String accessToken)
void
setExecutor(org.jboss.resteasy.client.jaxrs.ClientHttpEngine executor)
void
setRequest(T request)
void
setResponse(V response)
void
setUrl(String url)
-
-
-
Field Detail
-
request
protected T extends BaseRequest request
-
response
protected V extends BaseResponse response
-
resteasyClient
protected org.jboss.resteasy.client.jaxrs.ResteasyClient resteasyClient
-
webTarget
protected jakarta.ws.rs.client.WebTarget webTarget
-
requestForm
protected jakarta.ws.rs.core.Form requestForm
-
clientResponse
protected jakarta.ws.rs.core.Response clientResponse
-
executor
protected org.jboss.resteasy.client.jaxrs.ClientHttpEngine executor
-
-
Constructor Detail
-
BaseClient
protected BaseClient()
-
BaseClient
protected BaseClient(String url)
-
-
Method Detail
-
getUrl
public String getUrl()
-
setUrl
public void setUrl(String url)
-
getRequest
public T getRequest()
-
setRequest
public void setRequest(T request)
-
getResponse
public V getResponse()
-
setResponse
public void setResponse(V response)
-
getExecutor
public org.jboss.resteasy.client.jaxrs.ClientHttpEngine getExecutor()
-
setExecutor
public void setExecutor(org.jboss.resteasy.client.jaxrs.ClientHttpEngine executor)
-
addReqParam
protected void addReqParam(String key, io.jans.as.model.common.HasParamName value)
-
getRequestAsString
public String getRequestAsString()
-
getResponseAsString
public String getResponseAsString()
-
initClient
protected void initClient()
-
applyCookies
protected void applyCookies(jakarta.ws.rs.client.Invocation.Builder clientRequest)
-
closeConnection
public void closeConnection()
-
getHttpMethod
public abstract String getHttpMethod()
-
getCookies
public List<jakarta.ws.rs.core.Cookie> getCookies()
-
prepareAuthorizatedClientRequest
protected jakarta.ws.rs.client.Invocation.Builder prepareAuthorizatedClientRequest(io.jans.as.model.common.AuthorizationMethod authorizationMethod, String accessToken)
-
-