@Service public class CxAuthService extends Object implements CxAuthClient
| Constructor and Description |
|---|
CxAuthService(CxProperties cxProperties,
CxLegacyService cxLegacyService,
org.springframework.web.client.RestTemplate restTemplate) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.HttpHeaders |
createAuthHeaders()
Create REST API Headers for Authentication (JWT/OIDC)
|
String |
getAuthToken(String username,
String password,
String clientId,
String clientSecret,
String scope)
Get Auth Token
|
String |
getCurrentSoapToken() |
String |
getCurrentToken() |
String |
getLegacySession() |
String |
getSoapAuthToken(String username,
String password)
Get Auth Token specific to SOAP API Calls
|
String |
legacyLogin(String username,
String password)
Authenictate with Checkmarx and Creates a session to access Checkmarx Legacy SOAP based resource
|
public CxAuthService(CxProperties cxProperties, CxLegacyService cxLegacyService, @Qualifier(value="cxRestTemplate") org.springframework.web.client.RestTemplate restTemplate)
public String getAuthToken(String username, String password, String clientId, String clientSecret, String scope)
getAuthToken in interface CxAuthClientpublic String getSoapAuthToken(String username, String password)
getSoapAuthToken in interface CxAuthClientpublic String getCurrentToken()
getCurrentToken in interface CxAuthClientpublic String getCurrentSoapToken()
getCurrentSoapToken in interface CxAuthClientpublic String legacyLogin(String username, String password) throws InvalidCredentialsException
CxAuthClientlegacyLogin in interface CxAuthClientInvalidCredentialsExceptionpublic org.springframework.http.HttpHeaders createAuthHeaders()
CxAuthClientcreateAuthHeaders in interface CxAuthClientpublic String getLegacySession()
getLegacySession in interface CxAuthClientCopyright © 2020. All rights reserved.