public class JWTClientUtil extends Object
| Constructor and Description |
|---|
JWTClientUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addJWTConfigResourceToRegistry(int tenantId,
String content)
Get the jwt details from the registry for tenants.
|
static String |
generateSignedJWTAssertion(String username,
JWTConfig jwtConfig,
boolean isDefaultJWTClient) |
static org.wso2.carbon.registry.core.Resource |
getConfigRegistryResourceContent(int tenantId,
String registryLocation)
Get the jwt details from the registry for tenants.
|
static org.apache.http.client.HttpClient |
getHttpClient(String protocol)
Return a http client instance
|
static String |
getResponseString(org.apache.http.HttpResponse httpResponse) |
static void |
initialize(JWTClientManagerService jwtClientManagerService) |
public static org.apache.http.client.HttpClient getHttpClient(String protocol) throws IOException, KeyStoreException, NoSuchAlgorithmException, KeyManagementException
protocol- - service endpoint protocol http/httpsIOExceptionKeyStoreExceptionNoSuchAlgorithmExceptionKeyManagementExceptionpublic static String getResponseString(org.apache.http.HttpResponse httpResponse) throws IOException
IOExceptionpublic static void initialize(JWTClientManagerService jwtClientManagerService) throws org.wso2.carbon.registry.core.exceptions.RegistryException, IOException, JWTClientConfigurationException
org.wso2.carbon.registry.core.exceptions.RegistryExceptionIOExceptionJWTClientConfigurationExceptionpublic static org.wso2.carbon.registry.core.Resource getConfigRegistryResourceContent(int tenantId,
String registryLocation)
throws org.wso2.carbon.registry.core.exceptions.RegistryException
tenantId - for identify tenant space.registryLocation - retrive the config file from tenant space.org.wso2.carbon.registry.core.exceptions.RegistryExceptionpublic static void addJWTConfigResourceToRegistry(int tenantId,
String content)
throws org.wso2.carbon.registry.core.exceptions.RegistryException
tenantId - for accesing tenant space.org.wso2.carbon.registry.core.exceptions.RegistryExceptionpublic static String generateSignedJWTAssertion(String username, JWTConfig jwtConfig, boolean isDefaultJWTClient) throws JWTClientException
JWTClientExceptionCopyright © 2016 WSO2. All rights reserved.