Package io.jans.configapi.core.test
Class BaseTest
java.lang.Object
io.jans.configapi.core.test.BaseTest
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected static final Stringprotected static final Stringprotected org.apache.commons.codec.binary.Base64protected static final Stringprotected HttpServiceprotected org.apache.logging.log4j.Loggerprotected ResteasyServiceprotected TokenService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringdecodeFileValue(String value) protected jakarta.ws.rs.core.ResponseexecuteGet(String url, String clientId, String clientSecret, String authType, String authCode, Map<String, String> parameters, org.apache.http.entity.ContentType contentType) voidgetAccessTokenForGivenScope(String scopes) protected StringgetCredentials(String clientId, String clientSecret) protected StringReturns the client credentials encoded using base64.protected HttpServiceprotected Stringprotected ResteasyServiceprotected StringgetToken(String tokenUrl, String clientId, String clientSecret, io.jans.as.model.common.GrantType grantType, String scopes) protected TokenServicevoidinitTestSuite(org.testng.ITestContext context) protected booleanisEndpointAvailable(String url, String accessToken) protected booleanisServiceDeployed(String serviceName)
-
Field Details
-
CONTENT_TYPE
- See Also:
-
AUTHORIZATION
- See Also:
-
AUTHORIZATION_TYPE
- See Also:
-
log
protected org.apache.logging.log4j.Logger log -
base64
protected org.apache.commons.codec.binary.Base64 base64 -
propertiesMap
-
resteasyService
-
httpService
-
tokenService
-
accessToken
-
-
Constructor Details
-
BaseTest
public BaseTest()
-
-
Method Details
-
initTestSuite
@BeforeSuite public void initTestSuite(org.testng.ITestContext context) -
getAccessToken
@BeforeMethod public void getAccessToken() -
getAccessTokenForGivenScope
-
getToken
-
getIssuer
-
getHttpService
-
getResteasyService
-
getTokenService
-
getCredentials
protected String getCredentials(String clientId, String clientSecret) throws UnsupportedEncodingException - Throws:
UnsupportedEncodingException
-
getEncodedCredentials
Returns the client credentials encoded using base64.- Returns:
- The encoded client credentials.
-
decodeFileValue
-
isServiceDeployed
-
isEndpointAvailable
-
executeGet
-