Class APIMTestCaseUtils
- java.lang.Object
-
- org.wso2.am.integration.test.utils.generic.APIMTestCaseUtils
-
public class APIMTestCaseUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description APIMTestCaseUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddAPI(String backEndUrl, String sessionCookie, org.apache.axiom.om.OMElement api)static voidaddEndpoint(String backEndUrl, String sessionCookie, org.apache.axiom.om.OMElement endpointConfig)static voidaddEndpointTemplate(String backEndUrl, String sessionCookie, org.apache.axiom.om.OMElement endpointTemplate)static voidaddLocalEntry(String backEndUrl, String sessionCookie, org.apache.axiom.om.OMElement localEntryConfig)static voidaddPriorityExecutor(String backEndUrl, String sessionCookie, org.apache.axiom.om.OMElement priorityExecutor)static voidaddScheduleTask(String backEndUrl, String sessionCookie, org.apache.axiom.om.OMElement taskDescription)static voidaddSequence(String backEndUrl, String sessionCookie, org.apache.axiom.om.OMElement sequenceConfig)static voidaddSequenceTemplate(String backEndUrl, String sessionCookie, org.apache.axiom.om.OMElement sequenceTemplate)static byte[]decode(String stringToBeDecodedArg)This method is used to base64Url-decode a base64Url-encoded stringstatic voiddeleteApi(String backEndUrl, String sessionCookie, String apiName)static voiddeleteEndpoint(String backEndUrl, String sessionCookie, String endpointName)static voiddeleteEndpointTemplate(String backEndUrl, String sessionCookie, String endpointTemplate)static voiddeleteLocalEntry(String backEndUrl, String sessionCookie, String localEntryName)static voiddeletePriorityExecutor(String backEndUrl, String sessionCookie, String executorName)static voiddeleteScheduleTask(String backEndUrl, String sessionCookie, String taskName, String group)static voiddeleteSequence(String backEndUrl, String sessionCookie, String sequenceName)static voiddeleteSequenceTemplate(String backEndUrl, String sessionCookie, String sequenceTemplateName)static StringencodeCredentials(String user, char[] pass)get the base64 encoded username and passwordstatic APIBeangetAPIBeanFromHttpResponse(org.wso2.carbon.automation.test.utils.http.client.HttpResponse httpResponse)create API bean object from responsestatic List<org.wso2.carbon.apimgt.api.model.APIIdentifier>getAPIIdentifierListFromHttpResponse(APIListDTO apiListDTO)static List<org.wso2.carbon.apimgt.api.model.APIIdentifier>getAPIIdentifierListFromHttpResponse(APIListDTO apiListDTO)static List<org.wso2.carbon.apimgt.api.model.APIIdentifier>getAPIIdentifierListFromHttpResponse(org.wso2.carbon.automation.test.utils.http.client.HttpResponse httpResponse)Get the API information from the response object as Lost of APIIdentifierstatic StringgetDecodedJWT(String jwt)static StringgetDecodedJWTHeader(String jwt)static byte[]getDecodedJWTSignature(String jwt)static StringgetDecodedURLSafeJWT(String jwt)static StringgetDecodedURLSafeJWTHeader(String jwt)static byte[]getDecodedURLSafeJWTSignature(String jwt)static StringgetJWTAssertion(String jwt)static StringgetPayloadForPasswordGrant(String username, String password)Get the json payload required for getting an access token using the password grant-typestatic FilegetTempSwaggerFileWithContent(String swagger)static booleanisAPIAvailable(org.wso2.carbon.apimgt.api.model.APIIdentifier apiIdentifierToCheck, List<org.wso2.carbon.apimgt.api.model.APIIdentifier> apiIdentifierList)Check the given API is available in the APIIdentifier List.static booleanisAPIAvailable(org.wso2.carbon.apimgt.api.model.APIIdentifier apiIdentifier, APIListDTO apiListDTO)Check the given API is available in the APIIdentifier List.static booleanisAPIAvailableInStore(org.wso2.carbon.apimgt.api.model.APIIdentifier apiIdentifier, APIListDTO apiListDTO)Check the given API is available in the APIIdentifier List.static booleanisApiDeployed(String backEndUrl, String sessionCookie, String apiName)static booleanisApiExist(String backEndUrl, String sessionCookie, String apiName)static booleanisApiUnDeployed(String backEndUrl, String sessionCookie, String apiName)static booleanisEndpointDeployed(String backEndUrl, String sessionCookie, String endpointName)static booleanisEndpointExist(String backEndUrl, String sessionCookie, String endpointName)static booleanisEndpointTemplateDeployed(String backEndUrl, String sessionCookie, String endpointTemplateName)static booleanisEndpointTemplateExist(String backEndUrl, String sessionCookie, String endpointTemplate)static booleanisEndpointTemplateUnDeployed(String backEndUrl, String sessionCookie, String endpointTemplateName)static booleanisEndpointUnDeployed(String backEndUrl, String sessionCookie, String endpointName)static booleanisJwtSignatureValid(String jwtAssertion, byte[] jwtSignature, String jsonHeader)static booleanisLocalEntryDeployed(String backEndUrl, String sessionCookie, String localEntryName)static booleanisLocalEntryExist(String backEndUrl, String sessionCookie, String localEntryName)static booleanisLocalEntryUnDeployed(String backEndUrl, String sessionCookie, String localEntryName)static booleanisMessageProcessorUnDeployed(String backEndUrl, String sessionCookie, String messageProcessorName)static booleanisPriorityExecutorDeployed(String backEndUrl, String sessionCookie, String executorName)static booleanisPriorityExecutorExist(String backEndUrl, String sessionCookie, String priorityExecutorName)static booleanisPriorityExecutorUnDeployed(String backEndUrl, String sessionCookie, String executorName)static booleanisScheduleTaskDeployed(String backEndUrl, String sessionCookie, String taskName)static booleanisScheduleTaskExist(String backEndUrl, String sessionCookie, String taskName)static booleanisScheduleTaskUnDeployed(String backEndUrl, String sessionCookie, String taskName)static booleanisSequenceDeployed(String backEndUrl, String sessionCookie, String sequenceName)static booleanisSequenceExist(String backEndUrl, String sessionCookie, String sequenceName)static booleanisSequenceTemplateDeployed(String backEndUrl, String sessionCookie, String sequenceTemplateName)static booleanisSequenceTemplateExist(String backEndUrl, String sessionCookie, String sequenceTemplate)static booleanisSequenceTemplateUnDeployed(String backEndUrl, String sessionCookie, String sequenceTemplateName)static booleanisSequenceUnDeployed(String backEndUrl, String sessionCookie, String sequenceName)static org.apache.axiom.om.OMElementloadResource(String path)Loads the specified resource from the classpath and returns its content as an OMElement.static voidsendGetRequest(String url, String accessToken)static voidupdateSynapseConfiguration(org.apache.axiom.om.OMElement synapseConfig, String backendURL, String sessionCookie)static voidverifySynapseDeployment(org.apache.axiom.om.OMElement synapseConfig, String backendURL, String sessionCookie)
-
-
-
Method Detail
-
loadResource
public static org.apache.axiom.om.OMElement loadResource(String path) throws FileNotFoundException, XMLStreamException
Loads the specified resource from the classpath and returns its content as an OMElement.- Parameters:
path- A relative path to the resource file- Returns:
- An OMElement containing the resource content
- Throws:
FileNotFoundExceptionXMLStreamException
-
updateSynapseConfiguration
public static void updateSynapseConfiguration(org.apache.axiom.om.OMElement synapseConfig, String backendURL, String sessionCookie) throws Exception- Parameters:
synapseConfig- - Synapse configuration to be updatedbackendURL- - backend URL of the gateway serversessionCookie- - session cookie of user login- Throws:
Exception- - Throws if update fails
-
addEndpoint
public static void addEndpoint(String backEndUrl, String sessionCookie, org.apache.axiom.om.OMElement endpointConfig) throws Exception
- Throws:
Exception
-
addLocalEntry
public static void addLocalEntry(String backEndUrl, String sessionCookie, org.apache.axiom.om.OMElement localEntryConfig) throws Exception
- Throws:
Exception
-
addSequence
public static void addSequence(String backEndUrl, String sessionCookie, org.apache.axiom.om.OMElement sequenceConfig) throws Exception
- Throws:
Exception
-
addSequenceTemplate
public static void addSequenceTemplate(String backEndUrl, String sessionCookie, org.apache.axiom.om.OMElement sequenceTemplate) throws RemoteException
- Throws:
RemoteException
-
addEndpointTemplate
public static void addEndpointTemplate(String backEndUrl, String sessionCookie, org.apache.axiom.om.OMElement endpointTemplate) throws RemoteException
- Throws:
RemoteException
-
addAPI
public static void addAPI(String backEndUrl, String sessionCookie, org.apache.axiom.om.OMElement api) throws RemoteException, org.wso2.carbon.rest.api.stub.RestApiAdminAPIException
- Throws:
RemoteExceptionorg.wso2.carbon.rest.api.stub.RestApiAdminAPIException
-
addPriorityExecutor
public static void addPriorityExecutor(String backEndUrl, String sessionCookie, org.apache.axiom.om.OMElement priorityExecutor) throws RemoteException
- Throws:
RemoteException
-
addScheduleTask
public static void addScheduleTask(String backEndUrl, String sessionCookie, org.apache.axiom.om.OMElement taskDescription) throws org.wso2.carbon.task.stub.TaskManagementException, RemoteException
- Throws:
org.wso2.carbon.task.stub.TaskManagementExceptionRemoteException
-
isEndpointDeployed
public static boolean isEndpointDeployed(String backEndUrl, String sessionCookie, String endpointName) throws org.wso2.carbon.endpoint.stub.types.EndpointAdminEndpointAdminException, RemoteException
- Throws:
org.wso2.carbon.endpoint.stub.types.EndpointAdminEndpointAdminExceptionRemoteException
-
isSequenceDeployed
public static boolean isSequenceDeployed(String backEndUrl, String sessionCookie, String sequenceName) throws org.wso2.carbon.sequences.stub.types.SequenceEditorException, RemoteException
- Throws:
org.wso2.carbon.sequences.stub.types.SequenceEditorExceptionRemoteException
-
isSequenceTemplateDeployed
public static boolean isSequenceTemplateDeployed(String backEndUrl, String sessionCookie, String sequenceTemplateName) throws RemoteException
- Throws:
RemoteException
-
isEndpointTemplateDeployed
public static boolean isEndpointTemplateDeployed(String backEndUrl, String sessionCookie, String endpointTemplateName) throws RemoteException
- Throws:
RemoteException
-
isApiDeployed
public static boolean isApiDeployed(String backEndUrl, String sessionCookie, String apiName) throws RemoteException, org.wso2.carbon.rest.api.stub.RestApiAdminAPIException
- Throws:
RemoteExceptionorg.wso2.carbon.rest.api.stub.RestApiAdminAPIException
-
isPriorityExecutorDeployed
public static boolean isPriorityExecutorDeployed(String backEndUrl, String sessionCookie, String executorName) throws RemoteException
- Throws:
RemoteException
-
isScheduleTaskDeployed
public static boolean isScheduleTaskDeployed(String backEndUrl, String sessionCookie, String taskName) throws RemoteException, org.wso2.carbon.task.stub.TaskManagementException
- Throws:
RemoteExceptionorg.wso2.carbon.task.stub.TaskManagementException
-
isLocalEntryExist
public static boolean isLocalEntryExist(String backEndUrl, String sessionCookie, String localEntryName) throws org.wso2.carbon.localentry.stub.types.LocalEntryAdminException, RemoteException
- Throws:
org.wso2.carbon.localentry.stub.types.LocalEntryAdminExceptionRemoteException
-
isSequenceExist
public static boolean isSequenceExist(String backEndUrl, String sessionCookie, String sequenceName) throws org.wso2.carbon.sequences.stub.types.SequenceEditorException, RemoteException
- Throws:
org.wso2.carbon.sequences.stub.types.SequenceEditorExceptionRemoteException
-
isEndpointExist
public static boolean isEndpointExist(String backEndUrl, String sessionCookie, String endpointName) throws org.wso2.carbon.endpoint.stub.types.EndpointAdminEndpointAdminException, RemoteException
- Throws:
org.wso2.carbon.endpoint.stub.types.EndpointAdminEndpointAdminExceptionRemoteException
-
isSequenceTemplateExist
public static boolean isSequenceTemplateExist(String backEndUrl, String sessionCookie, String sequenceTemplate) throws RemoteException
- Throws:
RemoteException
-
isEndpointTemplateExist
public static boolean isEndpointTemplateExist(String backEndUrl, String sessionCookie, String endpointTemplate) throws RemoteException
- Throws:
RemoteException
-
isApiExist
public static boolean isApiExist(String backEndUrl, String sessionCookie, String apiName) throws RemoteException, org.wso2.carbon.rest.api.stub.RestApiAdminAPIException
- Throws:
RemoteExceptionorg.wso2.carbon.rest.api.stub.RestApiAdminAPIException
-
isPriorityExecutorExist
public static boolean isPriorityExecutorExist(String backEndUrl, String sessionCookie, String priorityExecutorName) throws RemoteException
- Throws:
RemoteException
-
isScheduleTaskExist
public static boolean isScheduleTaskExist(String backEndUrl, String sessionCookie, String taskName) throws RemoteException, org.wso2.carbon.task.stub.TaskManagementException
- Throws:
RemoteExceptionorg.wso2.carbon.task.stub.TaskManagementException
-
deleteLocalEntry
public static void deleteLocalEntry(String backEndUrl, String sessionCookie, String localEntryName) throws org.wso2.carbon.localentry.stub.types.LocalEntryAdminException, RemoteException
- Throws:
org.wso2.carbon.localentry.stub.types.LocalEntryAdminExceptionRemoteException
-
deleteEndpoint
public static void deleteEndpoint(String backEndUrl, String sessionCookie, String endpointName) throws org.wso2.carbon.endpoint.stub.types.EndpointAdminEndpointAdminException, RemoteException
- Throws:
org.wso2.carbon.endpoint.stub.types.EndpointAdminEndpointAdminExceptionRemoteException
-
deleteSequence
public static void deleteSequence(String backEndUrl, String sessionCookie, String sequenceName) throws org.wso2.carbon.sequences.stub.types.SequenceEditorException, RemoteException
- Throws:
org.wso2.carbon.sequences.stub.types.SequenceEditorExceptionRemoteException
-
deleteEndpointTemplate
public static void deleteEndpointTemplate(String backEndUrl, String sessionCookie, String endpointTemplate) throws RemoteException, org.wso2.carbon.sequences.stub.types.SequenceEditorException, org.wso2.carbon.endpoint.stub.types.EndpointAdminEndpointAdminException
- Throws:
RemoteExceptionorg.wso2.carbon.sequences.stub.types.SequenceEditorExceptionorg.wso2.carbon.endpoint.stub.types.EndpointAdminEndpointAdminException
-
deleteSequenceTemplate
public static void deleteSequenceTemplate(String backEndUrl, String sessionCookie, String sequenceTemplateName) throws RemoteException, org.wso2.carbon.sequences.stub.types.SequenceEditorException, org.wso2.carbon.endpoint.stub.types.EndpointAdminEndpointAdminException
- Throws:
RemoteExceptionorg.wso2.carbon.sequences.stub.types.SequenceEditorExceptionorg.wso2.carbon.endpoint.stub.types.EndpointAdminEndpointAdminException
-
deleteApi
public static void deleteApi(String backEndUrl, String sessionCookie, String apiName) throws RemoteException, org.wso2.carbon.rest.api.stub.RestApiAdminAPIException
- Throws:
RemoteExceptionorg.wso2.carbon.rest.api.stub.RestApiAdminAPIException
-
deletePriorityExecutor
public static void deletePriorityExecutor(String backEndUrl, String sessionCookie, String executorName) throws RemoteException
- Throws:
RemoteException
-
deleteScheduleTask
public static void deleteScheduleTask(String backEndUrl, String sessionCookie, String taskName, String group) throws org.wso2.carbon.task.stub.TaskManagementException, RemoteException
- Throws:
org.wso2.carbon.task.stub.TaskManagementExceptionRemoteException
-
isMessageProcessorUnDeployed
public static boolean isMessageProcessorUnDeployed(String backEndUrl, String sessionCookie, String messageProcessorName) throws org.wso2.carbon.sequences.stub.types.SequenceEditorException, RemoteException
- Throws:
org.wso2.carbon.sequences.stub.types.SequenceEditorExceptionRemoteException
-
isLocalEntryDeployed
public static boolean isLocalEntryDeployed(String backEndUrl, String sessionCookie, String localEntryName) throws org.wso2.carbon.localentry.stub.types.LocalEntryAdminException, RemoteException
- Throws:
org.wso2.carbon.localentry.stub.types.LocalEntryAdminExceptionRemoteException
-
isLocalEntryUnDeployed
public static boolean isLocalEntryUnDeployed(String backEndUrl, String sessionCookie, String localEntryName) throws org.wso2.carbon.localentry.stub.types.LocalEntryAdminException, RemoteException
- Throws:
org.wso2.carbon.localentry.stub.types.LocalEntryAdminExceptionRemoteException
-
isSequenceUnDeployed
public static boolean isSequenceUnDeployed(String backEndUrl, String sessionCookie, String sequenceName) throws org.wso2.carbon.sequences.stub.types.SequenceEditorException, RemoteException
- Throws:
org.wso2.carbon.sequences.stub.types.SequenceEditorExceptionRemoteException
-
isEndpointUnDeployed
public static boolean isEndpointUnDeployed(String backEndUrl, String sessionCookie, String endpointName) throws org.wso2.carbon.endpoint.stub.types.EndpointAdminEndpointAdminException, RemoteException
- Throws:
org.wso2.carbon.endpoint.stub.types.EndpointAdminEndpointAdminExceptionRemoteException
-
isEndpointTemplateUnDeployed
public static boolean isEndpointTemplateUnDeployed(String backEndUrl, String sessionCookie, String endpointTemplateName) throws org.wso2.carbon.endpoint.stub.types.EndpointAdminEndpointAdminException, RemoteException
- Throws:
org.wso2.carbon.endpoint.stub.types.EndpointAdminEndpointAdminExceptionRemoteException
-
isSequenceTemplateUnDeployed
public static boolean isSequenceTemplateUnDeployed(String backEndUrl, String sessionCookie, String sequenceTemplateName) throws org.wso2.carbon.endpoint.stub.types.EndpointAdminEndpointAdminException, RemoteException
- Throws:
org.wso2.carbon.endpoint.stub.types.EndpointAdminEndpointAdminExceptionRemoteException
-
isApiUnDeployed
public static boolean isApiUnDeployed(String backEndUrl, String sessionCookie, String apiName) throws RemoteException, org.wso2.carbon.rest.api.stub.RestApiAdminAPIException
- Throws:
RemoteExceptionorg.wso2.carbon.rest.api.stub.RestApiAdminAPIException
-
isPriorityExecutorUnDeployed
public static boolean isPriorityExecutorUnDeployed(String backEndUrl, String sessionCookie, String executorName) throws RemoteException
- Throws:
RemoteException
-
isScheduleTaskUnDeployed
public static boolean isScheduleTaskUnDeployed(String backEndUrl, String sessionCookie, String taskName) throws RemoteException, org.wso2.carbon.task.stub.TaskManagementException
- Throws:
RemoteExceptionorg.wso2.carbon.task.stub.TaskManagementException
-
verifySynapseDeployment
public static void verifySynapseDeployment(org.apache.axiom.om.OMElement synapseConfig, String backendURL, String sessionCookie) throws org.wso2.carbon.localentry.stub.types.LocalEntryAdminException, RemoteException, org.wso2.carbon.endpoint.stub.types.EndpointAdminEndpointAdminException, org.wso2.carbon.sequences.stub.types.SequenceEditorException, org.wso2.carbon.rest.api.stub.RestApiAdminAPIException- Throws:
org.wso2.carbon.localentry.stub.types.LocalEntryAdminExceptionRemoteExceptionorg.wso2.carbon.endpoint.stub.types.EndpointAdminEndpointAdminExceptionorg.wso2.carbon.sequences.stub.types.SequenceEditorExceptionorg.wso2.carbon.rest.api.stub.RestApiAdminAPIException
-
getAPIBeanFromHttpResponse
public static APIBean getAPIBeanFromHttpResponse(org.wso2.carbon.automation.test.utils.http.client.HttpResponse httpResponse) throws APIManagerIntegrationTestException
create API bean object from response- Parameters:
httpResponse- - HTTP response- Returns:
- - APIBean instance
- Throws:
APIManagerIntegrationTestException
-
sendGetRequest
public static void sendGetRequest(String url, String accessToken) throws XPathExpressionException, IOException
- Throws:
XPathExpressionExceptionIOException
-
getDecodedJWT
public static String getDecodedJWT(String jwt) throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
getJWTAssertion
public static String getJWTAssertion(String jwt) throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
isJwtSignatureValid
public static boolean isJwtSignatureValid(String jwtAssertion, byte[] jwtSignature, String jsonHeader) throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
getDecodedJWTHeader
public static String getDecodedJWTHeader(String jwt) throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
getDecodedJWTSignature
public static byte[] getDecodedJWTSignature(String jwt) throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
getDecodedURLSafeJWTSignature
public static byte[] getDecodedURLSafeJWTSignature(String jwt) throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
decode
public static byte[] decode(String stringToBeDecodedArg) throws UnsupportedEncodingException
This method is used to base64Url-decode a base64Url-encoded string- Parameters:
stringToBeDecodedArg- - The base64Url encoded string to be decoded- Returns:
- - The base64Url decoded string
- Throws:
UnsupportedEncodingException
-
getDecodedURLSafeJWT
public static String getDecodedURLSafeJWT(String jwt) throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
getDecodedURLSafeJWTHeader
public static String getDecodedURLSafeJWTHeader(String jwt) throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
getAPIIdentifierListFromHttpResponse
public static List<org.wso2.carbon.apimgt.api.model.APIIdentifier> getAPIIdentifierListFromHttpResponse(org.wso2.carbon.automation.test.utils.http.client.HttpResponse httpResponse) throws APIManagerIntegrationTestException
Get the API information from the response object as Lost of APIIdentifier- Parameters:
httpResponse- Response that contains the API information- Returns:
- List of APIIdentifier
- Throws:
org.json.JSONExceptionAPIManagerIntegrationTestException
-
getAPIIdentifierListFromHttpResponse
public static List<org.wso2.carbon.apimgt.api.model.APIIdentifier> getAPIIdentifierListFromHttpResponse(APIListDTO apiListDTO)
- Parameters:
apiListDTO-- Returns:
- Throws:
APIManagerIntegrationTestException
-
getAPIIdentifierListFromHttpResponse
public static List<org.wso2.carbon.apimgt.api.model.APIIdentifier> getAPIIdentifierListFromHttpResponse(APIListDTO apiListDTO)
- Parameters:
apiListDTO-- Returns:
- Throws:
APIManagerIntegrationTestException
-
isAPIAvailable
public static boolean isAPIAvailable(org.wso2.carbon.apimgt.api.model.APIIdentifier apiIdentifierToCheck, List<org.wso2.carbon.apimgt.api.model.APIIdentifier> apiIdentifierList)Check the given API is available in the APIIdentifier List. it will match for API Name,API Version and API Provider- Parameters:
apiIdentifierToCheck- - API identifier to verifyapiIdentifierList- - API identifier list- Returns:
- - Status of API availability
-
getPayloadForPasswordGrant
public static String getPayloadForPasswordGrant(String username, String password)
Get the json payload required for getting an access token using the password grant-type- Parameters:
username- - The username of the user (required)password- - The password of the user (required)- Returns:
- - The json payload. Sample: "grant_type=password&username=user&password=pass"
-
isAPIAvailable
public static boolean isAPIAvailable(org.wso2.carbon.apimgt.api.model.APIIdentifier apiIdentifier, APIListDTO apiListDTO)Check the given API is available in the APIIdentifier List. it will match for API Name,API Version and API Provider- Parameters:
apiIdentifier- - API DTO to verifyapiListDTO- - API Info DTO list- Returns:
- - Status of API availability
-
isAPIAvailableInStore
public static boolean isAPIAvailableInStore(org.wso2.carbon.apimgt.api.model.APIIdentifier apiIdentifier, APIListDTO apiListDTO)Check the given API is available in the APIIdentifier List. it will match for API Name,API Version and API Provider- Parameters:
apiIdentifier- - API DTO to verifyapiListDTO- - API Info DTO list- Returns:
- - Status of API availability
-
encodeCredentials
public static String encodeCredentials(String user, char[] pass)
get the base64 encoded username and password- Parameters:
user- usernamepass- password- Returns:
- encoded basic auth, as string
-
-