Struct fxa_client::ScopedKey

source ·
pub struct ScopedKey {
    pub kty: String,
    pub scope: String,
    pub k: String,
    pub kid: String,
}
Expand description

A cryptograpic 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.

Fields§

§kty: String

The type of key.

In practice for FxA, this will always be string string “oct” (short for “octal”) to represent a raw symmetric key.

§scope: String

The OAuth scope with which this key is associated.

§k: 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.

§kid: String

An opaque unique identifier for this key.

Unlike the k field, this value is not secret and may be revealed to the server.

Implementations§

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.