public class NetStorageCmsSigner extends Object
Modifier and Type | Class and Description |
---|---|
static class |
NetStorageCmsSigner.SignType
Currently only 3 signing hash types are supported.
|
Modifier and Type | Field and Description |
---|---|
protected static String |
ACTION_HEADER |
protected static String |
AUTH_DATA_HEADER |
protected static String |
AUTH_SIGN_HEADER |
Constructor and Description |
---|
NetStorageCmsSigner(URI uri,
CredentialFactory accessTokenCf,
NetStorageCmsSigner.SignType signType) |
NetStorageCmsSigner(URI uri,
String nonce,
String accessToken)
Primary invocation for an API communication.
|
NetStorageCmsSigner(URI uri,
String nonce,
String accessToken,
NetStorageCmsSigner.SignType signType)
Primary invocation for an API communication.
|
Modifier and Type | Method and Description |
---|---|
Map<String,String> |
computeHeaders(NetStorageRequest netStorageAction)
Assembles the HTTP Headers necessary for API communication
|
protected String |
getActionHeaderValue(NetStorageRequest action)
Computes the value for the the X-Akamai-ACS-Action: header.
|
protected String |
getAuthDataHeaderValue()
Constructs the X-Akamai-ACS-Auth-Data header which contains the signing version, the current time, a random number
and the nonce that is used to sign the data.
|
protected String |
getAuthSignHeaderValue(String action,
String authData)
Computes the X-Akamai-ACS-Auth-Sign header for a given Action and Data header values.
|
protected static final String ACTION_HEADER
protected static final String AUTH_DATA_HEADER
protected static final String AUTH_SIGN_HEADER
public NetStorageCmsSigner(URI uri, String nonce, String accessToken)
uri
- the url to interact with (eg: http://example.akamaihd.net/254462 )nonce
- provisioned nonce from the Luna portalaccessToken
- the associated accessToken generated by the portalpublic NetStorageCmsSigner(URI uri, String nonce, String accessToken, NetStorageCmsSigner.SignType signType)
uri
- the url to interact with (eg: http://example.akamaihd.net/254462 )nonce
- provisioned nonce from the Luna portalaccessToken
- the associated accessToken generated by the portalsignType
- the base64 encoded signature algorithmpublic NetStorageCmsSigner(URI uri, CredentialFactory accessTokenCf, NetStorageCmsSigner.SignType signType)
protected String getActionHeaderValue(NetStorageRequest action)
action
- the set of action parameters to be sent in the API requestNetStorageRequest
protected String getAuthDataHeaderValue()
protected String getAuthSignHeaderValue(String action, String authData)
action
- action header values getActionHeaderValue(NetStorageRequest)
authData
- data header values getAuthDataHeaderValue()
public Map<String,String> computeHeaders(NetStorageRequest netStorageAction)
netStorageAction
- the set of action parameters to be sent in the API requestCopyright © 2023 Frank!Framework. All rights reserved.