public class HttpMessageSecurity extends Object
| Constructor and Description |
|---|
HttpMessageSecurity(String clientSecurityToken,
String clientSignatureKeyString,
String serverEncryptionKeyString,
String serverSignatureKeyString)
Constructor.
|
HttpMessageSecurity(String clientSecurityToken,
String clientEncryptionString,
String clientSignatureKeyString,
String serverEncryptionKeyString,
String serverSignatureKeyString,
boolean testMode)
Constructor (tests only).
|
| Modifier and Type | Method and Description |
|---|---|
okhttp3.Request |
protectRequest(okhttp3.Request request)
Protects existing request.
|
okhttp3.Response |
unprotectResponse(okhttp3.Response response)
Unprotects response if needed.
|
public HttpMessageSecurity(String clientSecurityToken, String clientSignatureKeyString, String serverEncryptionKeyString, String serverSignatureKeyString) throws IOException
clientSecurityToken - pop or bearer authentication token.clientSignatureKeyString - string with client signing key (public + private parts) or null if
not supportedserverEncryptionKeyString - string with server encryption key (public only) or null if not
supportedserverSignatureKeyString - string with server signing key (public only) or null if not
supportedIOException - throws IOExceptionpublic HttpMessageSecurity(String clientSecurityToken, String clientEncryptionString, String clientSignatureKeyString, String serverEncryptionKeyString, String serverSignatureKeyString, boolean testMode) throws IOException
clientSecurityToken - pop or bearer authentication token.clientEncryptionString - string with client signing key (public + private parts) or null if
not supportedclientSignatureKeyString - string with client signing key (public + private parts) or null if
not supportedserverEncryptionKeyString - string with server encryption key (public only) or null if not
supportedserverSignatureKeyString - string with server signing key (public only) or null if not
supportedtestMode - true for test mode (uses 0 for timestamp)IOException - throws IOExceptionpublic okhttp3.Request protectRequest(okhttp3.Request request)
throws IOException
request - existing request.IOException - throws IOExceptionpublic okhttp3.Response unprotectResponse(okhttp3.Response response)
throws IOException
response - server response.IOException - throws IOException/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/