Package io.jans.as.client
Class BaseRequest
- java.lang.Object
-
- io.jans.as.client.BaseRequest
-
- Direct Known Subclasses:
AuthorizationRequest
,ClientAuthnRequest
,ClientInfoRequest
,EndSessionRequest
,FirebaseCloudMessagingRequest
,GluuConfigurationRequest
,JwkRequest
,OpenIdConfigurationRequest
,OpenIdConnectDiscoveryRequest
,PingCallbackRequest
,PushErrorRequest
,PushTokenDeliveryRequest
,RegisterRequest
,UserInfoRequest
public abstract class BaseRequest extends java.lang.Object
- Version:
- January 26. 2018
- Author:
- Javier Rojas Blum
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BaseRequest()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addCustomParameter(java.lang.String paramName, java.lang.String paramValue)
io.jans.as.model.common.AuthenticationMethod
getAuthenticationMethod()
io.jans.as.model.common.AuthorizationMethod
getAuthorizationMethod()
java.lang.String
getAuthPassword()
java.lang.String
getAuthUsername()
java.lang.String
getContentType()
java.lang.String
getCredentials()
Returns the client credentials (URL encoded).java.util.Map<java.lang.String,java.lang.String>
getCustomParameters()
java.lang.String
getEncodedCredentials()
Returns the client credentials encoded using base64.static java.lang.String
getEncodedCredentials(java.lang.String clientId, java.lang.String clientSecret)
org.json.JSONObject
getJSONParameters()
java.lang.String
getMediaType()
java.util.Map<java.lang.String,java.lang.String>
getParameters()
abstract java.lang.String
getQueryString()
boolean
hasCredentials()
void
setAuthenticationMethod(io.jans.as.model.common.AuthenticationMethod authenticationMethod)
void
setAuthorizationMethod(io.jans.as.model.common.AuthorizationMethod authorizationMethod)
void
setAuthPassword(java.lang.String authPassword)
void
setAuthUsername(java.lang.String authUsername)
void
setContentType(java.lang.String contentType)
void
setMediaType(java.lang.String mediaType)
-
-
-
Method Detail
-
getContentType
public java.lang.String getContentType()
-
setContentType
public void setContentType(java.lang.String contentType)
-
getMediaType
public java.lang.String getMediaType()
-
setMediaType
public void setMediaType(java.lang.String mediaType)
-
getAuthUsername
public java.lang.String getAuthUsername()
-
setAuthUsername
public void setAuthUsername(java.lang.String authUsername)
-
getAuthPassword
public java.lang.String getAuthPassword()
-
setAuthPassword
public void setAuthPassword(java.lang.String authPassword)
-
getAuthenticationMethod
public io.jans.as.model.common.AuthenticationMethod getAuthenticationMethod()
-
setAuthenticationMethod
public void setAuthenticationMethod(io.jans.as.model.common.AuthenticationMethod authenticationMethod)
-
getAuthorizationMethod
public io.jans.as.model.common.AuthorizationMethod getAuthorizationMethod()
-
setAuthorizationMethod
public void setAuthorizationMethod(io.jans.as.model.common.AuthorizationMethod authorizationMethod)
-
getCustomParameters
public java.util.Map<java.lang.String,java.lang.String> getCustomParameters()
-
addCustomParameter
public void addCustomParameter(java.lang.String paramName, java.lang.String paramValue)
-
hasCredentials
public boolean hasCredentials()
-
getCredentials
public java.lang.String getCredentials() throws java.io.UnsupportedEncodingException
Returns the client credentials (URL encoded).- Returns:
- The client credentials.
- Throws:
java.io.UnsupportedEncodingException
-
getEncodedCredentials
public java.lang.String getEncodedCredentials()
Returns the client credentials encoded using base64.- Returns:
- The encoded client credentials.
-
getEncodedCredentials
public static java.lang.String getEncodedCredentials(java.lang.String clientId, java.lang.String clientSecret) throws java.io.UnsupportedEncodingException
- Throws:
java.io.UnsupportedEncodingException
-
getParameters
public java.util.Map<java.lang.String,java.lang.String> getParameters()
-
getJSONParameters
public org.json.JSONObject getJSONParameters() throws org.json.JSONException
- Throws:
org.json.JSONException
-
getQueryString
public abstract java.lang.String getQueryString()
-
-