DefaultSudoProfilesClient
public class DefaultSudoProfilesClient : SudoProfilesClient
Default implementation of SudoProfilesClient.
-
Intializes a new
DefaultSudoProfilesClientinstance. It uses configuration parameters defined insudoplatformconfig.jsonfile located in the app bundle.Throws
SudoProfilesClientErrorDeclaration
Swift
convenience public init(sudoUserClient: SudoUserClient, blobContainerURL: URL, maxSudos: Int = 10) throwsParameters
sudoUserClientSudoUserClientinstance required to issue authentication tokens and perform cryptographic operations.blobContainerURLContainer URL to which large binary objects will be stored.
maxSudosMaximum number of Sudos to cap the queries to. Defaults to 10.
loggerA logger to use for logging messages. If none provided then a default internal logger will be used.
-
init(config:sudoUserClient: cacheType: blobContainerURL: maxSudos: logger: cryptoProvider: graphQLClient: s3Client: ownershipProofIssuer: ) Intializes a new
DefaultSudoProfilesClientinstance with the specified backend configuration.Throws
SudoProfilesClientErrorDeclaration
Swift
public init(config: [String : Any], sudoUserClient: SudoUserClient, cacheType: CacheType = .disk, blobContainerURL: URL, maxSudos: Int = 10, logger: Logger? = nil, cryptoProvider: CryptoProvider? = nil, graphQLClient: SudoApiClient? = nil, s3Client: S3Client? = nil, ownershipProofIssuer: OwnershipProofIssuer? = nil) throwsParameters
configConfiguration parameters for the client.
sudoUserClientSudoUserClientinstance required to issue authentication tokens and perform cryptographic operations.cacheTypeCache type to use. Please refer to CacheType enum.
blobContainerURLContainer URL to which large binary objects will be stored.
maxSudosMaximum number of Sudos to cap the quries to. Defaults to 10.
loggerA logger to use for logging messages. If none provided then a default internal logger will be used.
graphQLClientOptional GraphQL client to use. Mainly used for unit testing.
s3ClientOptional S3 client to use. Mainly use for unit testing.
ownershipProofIssuerOptional ownership proof issuer to use. Mainly use for testing of various service clients.
-
createSudo(sudo:Asynchronous) -
updateSudo(sudo:Asynchronous) -
deleteSudo(sudo:Asynchronous) Declaration
Swift
public func deleteSudo(sudo: Sudo) async throws -
listSudos(option:Asynchronous) Declaration
Swift
public func listSudos(option: ListOption) async throws -> [Sudo] -
Declaration
Swift
public func getOutstandingRequestsCount() -> Int -
Declaration
Swift
public func reset() throws -
subscribe(id:Asynchronoussubscriber: ) Declaration
Swift
public func subscribe(id: String, subscriber: SudoSubscriber) async throws -
subscribe(id:AsynchronouschangeType: subscriber: ) Declaration
Swift
public func subscribe(id: String, changeType: SudoChangeType, subscriber: SudoSubscriber) async throws -
Declaration
Swift
public func unsubscribe(id: String, changeType: SudoChangeType) -
Declaration
Swift
public func unsubscribe(id: String) -
Declaration
Swift
public func unsubscribeAll() -
getOwnershipProof(sudo:Asynchronousaudience: ) Declaration
Swift
public func getOwnershipProof(sudo: Sudo, audience: String) async throws -> String -
Declaration
Swift
public func generateEncryptionKey() throws -> String -
Declaration
Swift
public func getSymmetricKeyId() throws -> String? -
Declaration
Swift
public func importEncryptionKeys(keys: [EncryptionKey], currentKeyId: String) throws -
Declaration
Swift
public func exportEncryptionKeys() throws -> [EncryptionKey]
DefaultSudoProfilesClient Class Reference