KeyknoxClient
@objc(VSSKeyknoxClient)
open class KeyknoxClient : BaseClient
extension KeyknoxClient: KeyknoxClientProtocol
Class representing operations with Virgil Keyknox service
-
Default URL for service
Declaration
Swift
@objc public static let defaultURL: URL -
Error domain for Error instances thrown from service
Declaration
Swift
override open class var serviceErrorDomain: String { get } -
Initializes new
KeyknoxClientinstanceDeclaration
Swift
@objc public convenience init(accessTokenProvider: AccessTokenProvider)Parameters
accessTokenProviderAccess Token Provider
-
Initializes new
KeyknoxClientinstanceDeclaration
Swift
@objc public convenience init(accessTokenProvider: AccessTokenProvider, serviceUrl: URL)Parameters
accessTokenProviderAccess Token Provider
serviceUrlservice URL
-
Initializes new
KeyknoxClientinstanceDeclaration
Swift
public init(accessTokenProvider: AccessTokenProvider, serviceUrl: URL, connection: HttpConnectionProtocol? = nil, retryConfig: ExpBackoffRetry.Config)Parameters
accessTokenProviderAccess Token Provider
serviceUrlservice URL
requestRetryConfigRetry config
-
Header key for blob hash
Declaration
Swift
@objc public static let virgilKeyknoxHashKey: String -
Header key for previous blob hash
Declaration
Swift
@objc public static let virgilKeyknoxPreviousHashKey: String -
Default root value
Declaration
Swift
@objc public static let keyStorageRoot: String -
Default path value
Declaration
Swift
@objc public static let keyStoragePath: String -
Default key value
Declaration
Swift
@objc public static let keyStorageKey: String -
Push value to Keyknox service
Throws
- KeyknoxClientError.emptyIdentities, if identities are empty
- KeyknoxClientError.constructingUrl, if url initialization failed
- KeyknoxClientError.invalidOptions, if internal options error occured
- ServiceError, if service returned correctly-formed error json
- NSError with KeyknoxClient.serviceErrorDomain error domain, http status code as error code, and description string if present in http body
- Rethrows from
ServiceRequest,HttpConnectionProtocol,JsonDecoder,BaseClient
Declaration
Swift
public func pushValue(params: KeyknoxPushParams? = nil, meta: Data, value: Data, previousHash: Data?) throws -> EncryptedKeyknoxValueParameters
paramsparams
metameta data
valueencrypted blob
previousHashhash of previous blob
Return Value
EncryptedKeyknoxValue
-
Pulls values from Keyknox service
Throws
- KeyknoxClientError.constructingUrl, if url initialization failed
- ServiceError, if service returned correctly-formed error json
- NSError with KeyknoxClient.serviceErrorDomain error domain, http status code as error code, and description string if present in http body
- Rethrows from
ServiceRequest,HttpConnectionProtocol,JsonDecoder,BaseClient
Declaration
Swift
public func pullValue(params: KeyknoxPullParams? = nil) throws -> EncryptedKeyknoxValueParameters
paramsPull params
Return Value
EncryptedKeyknoxValue
-
Get keys for given root
Throws
- KeyknoxClientError.constructingUrl, if url initialization failed
- ServiceError, if service returned correctly-formed error json
- NSError with KeyknoxClient.serviceErrorDomain error domain, http status code as error code, and description string if present in http body
- Rethrows from
ServiceRequest,HttpConnectionProtocol,JsonDecoder,BaseClient
Declaration
Swift
public func getKeys(params: KeyknoxGetKeysParams) throws -> Set<String>Parameters
paramsGet keys params
Return Value
Array of keys
-
Resets Keyknox value (makes it empty)
Throws
- KeyknoxClientError.constructingUrl, if url initialization failed
- ServiceError, if service returned correctly-formed error json
- NSError with KeyknoxClient.serviceErrorDomain error domain, http status code as error code, and description string if present in http body
- Rethrows from
ServiceRequest,HttpConnectionProtocol,JsonDecoder,BaseClient
Declaration
Swift
open func resetValue(params: KeyknoxResetParams? = nil) throws -> DecryptedKeyknoxValueParameters
paramsReset params
Return Value
DecryptedKeyknoxValue
-
Deletes recipient
Throws
- KeyknoxClientError.constructingUrl, if url initialization failed
- ServiceError, if service returned correctly-formed error json
- NSError with KeyknoxClient.serviceErrorDomain error domain, http status code as error code, and description string if present in http body
- Rethrows from
ServiceRequest,HttpConnectionProtocol,JsonDecoder,BaseClient
Declaration
Swift
open func deleteRecipient(params: KeyknoxDeleteRecipientParams) throws -> DecryptedKeyknoxValueParameters
paramsDelete recipient params
Return Value
DecryptedKeyknoxValue
KeyknoxClient Class Reference