Class OAuth1RequestAuthorizationStrategy
java.lang.Object
org.qubership.atp.itf.lite.backend.components.auth.AbstractAuthorizationStrategy
org.qubership.atp.itf.lite.backend.components.auth.OAuth1RequestAuthorizationStrategy
- All Implemented Interfaces:
RequestAuthorizationStrategy
@Component
public class OAuth1RequestAuthorizationStrategy
extends AbstractAuthorizationStrategy
implements RequestAuthorizationStrategy
-
Field Summary
Fields inherited from class org.qubership.atp.itf.lite.backend.components.auth.AbstractAuthorizationStrategy
AUTH_HEADER_KEY, encryptionService, TO_ENCRYPT_FLAG -
Constructor Summary
ConstructorsConstructorDescriptionOAuth1RequestAuthorizationStrategy(EncryptionService encryptionService, org.modelmapper.ModelMapper modelMapper) -
Method Summary
Modifier and TypeMethodDescriptionvoiddecryptParameters(AuthorizationSaveRequest requestAuthorization) voidencryptParameters(AuthorizationSaveRequest requestAuthorization) generateAuthorizationHeader(RequestAuthorization authorization) Generates a header to be displayed on the UI.generateAuthorizationParams(RequestAuthorization authorization) Generates a params to be displayed on the UI.parseAuthorizationFromMap(Map<String, String> authorizationInfo) performAuthorization(UUID projectId, String url, org.springframework.util.MultiValueMap<String, String> map) Methods inherited from class org.qubership.atp.itf.lite.backend.components.auth.AbstractAuthorizationStrategy
decodeParameter, decryptParameter, encryptParameter
-
Constructor Details
-
OAuth1RequestAuthorizationStrategy
public OAuth1RequestAuthorizationStrategy(EncryptionService encryptionService, org.modelmapper.ModelMapper modelMapper)
-
-
Method Details
-
getAuthorizationToken
public AuthorizationStrategyResponse getAuthorizationToken(AuthorizationStrategyRequest request) throws org.qubership.atp.crypt.exception.AtpDecryptException - Specified by:
getAuthorizationTokenin interfaceRequestAuthorizationStrategy- Throws:
org.qubership.atp.crypt.exception.AtpDecryptException
-
encryptParameters
- Specified by:
encryptParametersin interfaceRequestAuthorizationStrategy
-
decryptParameters
- Specified by:
decryptParametersin interfaceRequestAuthorizationStrategy
-
performAuthorization
public OAuth2AuthrizationResponse performAuthorization(UUID projectId, String url, org.springframework.util.MultiValueMap<String, String> map) - Specified by:
performAuthorizationin interfaceRequestAuthorizationStrategy
-
getAuthorizationType
- Specified by:
getAuthorizationTypein interfaceRequestAuthorizationStrategy
-
parseAuthorizationFromMap
- Specified by:
parseAuthorizationFromMapin interfaceRequestAuthorizationStrategy
-
generateAuthorizationHeader
Description copied from interface:RequestAuthorizationStrategyGenerates a header to be displayed on the UI.- Specified by:
generateAuthorizationHeaderin interfaceRequestAuthorizationStrategy- Parameters:
authorization- request authorization- Returns:
RequestHeadergenerated request header
-
generateAuthorizationParams
Description copied from interface:RequestAuthorizationStrategyGenerates a params to be displayed on the UI.- Specified by:
generateAuthorizationParamsin interfaceRequestAuthorizationStrategy- Parameters:
authorization- request authorization- Returns:
RequestParamgenerated request params
-