ScopedKey
public struct ScopedKey
extension ScopedKey: Equatable, Hashable
A cryptographic key associated with an OAuth scope.
Some OAuth scopes have a corresponding client-side encryption key that is required in order to access protected data. This struct represents such key material in a format compatible with the common “JWK” standard.
-
The type of key.
In practice for FxA, this will always be string string “oct” (short for “octal”) to represent a raw symmetric key.
Declaration
Swift
public var kty: String
-
The OAuth scope with which this key is associated.
Declaration
Swift
public var scope: String
-
The key material, as base64-url-encoded bytes.
⚠️ Warning: the value of this field should never be revealed outside of the application. For example, it should never to sent to a server or logged in a log file.
Declaration
Swift
public var k: String
-
An opaque unique identifier for this key.
Unlike the
k
field, this value is not secret and may be revealed to the server.Declaration
Swift
public var kid: String
-
Declaration
Swift
public init( /** * The type of key. * * In practice for FxA, this will always be string string "oct" (short for "octal") * to represent a raw symmetric key. */kty: String, /** * The OAuth scope with which this key is associated. */scope: String, /** * The key material, as base64-url-encoded bytes. * * **⚠️ Warning:** the value of this field should never be revealed outside of the * application. For example, it should never to sent to a server or logged in a log file. */k: String, /** * An opaque unique identifier for this key. * * Unlike the `k` field, this value is not secret and may be revealed to the server. */kid: String)
-
Declaration
Swift
public static func == (lhs: ScopedKey, rhs: ScopedKey) -> Bool
-
Declaration
Swift
public func hash(into hasher: inout Hasher)