Functions
The following functions are available globally.
-
Verifies the existence of a user using a JWT to identify their user record.
Returns
nilif the user could not be found.Declaration
Swift
public func userVerify(jwt: Jwt, timeout: Duration? = nil) -> Result<UserResult?, IronOxideError>Parameters
jwtValid IronCore or Auth0 JWT
timeoutTimeout for this operation or
nilfor no timeout -
Creates a user.
Declaration
Swift
public func userCreate( jwt: Jwt, password: String, options: UserCreateOpts = UserCreateOpts(), timeout: Duration? = nil ) -> Result<UserCreateResult, IronOxideError>Parameters
jwtValid IronCore or Auth0 JWT
passwordPassword to use for encrypting and escrowing the user’s private key
optionsUser creation parameters
timeoutTimeout for this operation or
nilfor no timeout -
Generates a new device for the user specified in the JWT.
This will result in a new transform key (from the user’s master private key to the new device’s public key) being generated and stored with the IronCore Service.
Declaration
Swift
public func generateNewDevice( jwt: Jwt, password: String, options: DeviceCreateOpts = DeviceCreateOpts(), timeout: Duration? = nil ) -> Result<DeviceAddResult, IronOxideError>Parameters
jwtValid IronCore or Auth0 JWT
passwordPassword for the user specified in the JWT
optionsDevice creation parameters
timeoutTimeout for this operation or
nilfor no timeout -
Initializes the IronOxide SDK with a device.
Verifies that the provided user/segment exists and the provided device keys are valid and exist for the provided account.
Declaration
Swift
public func initialize(device: DeviceContext, config: IronOxideConfig = IronOxideConfig()) -> Result<SDK, IronOxideError>Parameters
deviceDevice to use to initialize the SDK
configConfiguration options to apply to the resulting SDK
-
Initializes IronOxide with a device, then rotates private keys where necessary for the user and their groups.
Verifies that the provided user/segment exists and the provided device keys are valid and exist for the provided account. After initialization, checks whether the calling user’s private key needs rotation and rotates it if necessary, then does the same for each group the user is an admin of.
This takes an optional
timeoutthat is used for the rotation call. This is separate from theconfigtimeout because it is expected that rotation could take significantly longer than other operations.Declaration
Swift
public func initializeAndRotate( device: DeviceContext, password: String, config: IronOxideConfig = IronOxideConfig(), timeout: Duration? ) -> Result<SDK, IronOxideError>Parameters
deviceDevice to use to initialize the SDK
passwordUser’s password needed for rotation
configConfiguration options to apply to the resulting SDK
timeoutTimeout to use for rotation
View on GitHub
Functions Reference