protocol
Module: protocol
Section titled “Module: protocol”Contents
Section titled “Contents”Structs
AuthenticatedConnection- Result of the first authenticated Workspace request.AuthorizationRequest- An authorization URL coupled to the only listener that can complete it.AuthorizedTokenExchange- A callback result that cannot lose its original redirect URI.NativeAccessGrant- The result of one token exchange. The access token is never formatted orNativeTokenClient- A bounded, redirect rejecting token transport for one PKCE exchange.TerminalAuthorizationRequest- One terminal-code attempt using the original PKCE verifier without a listener.
Enums
AuthorizationScope- Whether an authorization may issue a renewable credential.NativeTokenError- A native login failure that never includes code, verifier, state, or token.
firma_login::protocol::AuthenticatedConnection
Section titled “firma_login::protocol::AuthenticatedConnection”Struct
Result of the first authenticated Workspace request.
Fields:
workspace_id: firma_identifiers::WorkspaceId- Workspace the access token is bound to.membership_id: firma_identifiers::MembershipId- Membership the access token is bound to.
Methods:
fn access_token(self: &Self) -> &SecretString- The access token, still wrapped soDebugstays redacted.fn into_refresh_token(self: Self) -> Option<SecretString>- Moves the renewable credential out after identity proof succeeds.
firma_login::protocol::AuthorizationRequest
Section titled “firma_login::protocol::AuthorizationRequest”Struct
An authorization URL coupled to the only listener that can complete it.
Methods:
fn with_scope(origin: &ControlPlaneOrigin, pending: PendingAuthorizationAttempt, scope: AuthorizationScope) -> Self- Compose an authorization request with the selected scope.fn as_url(self: &Self) -> &Url- URL to give to the browser. It contains state and must not enter logs.fn receive(self: Self, timeout: CallbackWaitTimeout) -> Result<AuthorizedTokenExchange, LoopbackCallbackError>- Receive the browser callback and keep its original redirect URI pairedfn redirect_uri(self: &Self) -> &Url- Exact redirect URI retained for the token exchange.
firma_login::protocol::AuthorizationScope
Section titled “firma_login::protocol::AuthorizationScope”Enum
Whether an authorization may issue a renewable credential.
Variants:
AccessOnly- Request only the short-lived access credential.OfflineAccess- Request anoffline_accessrefresh credential.
Traits: Eq, Copy
Trait Implementations:
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- Default
fn default() -> Self
- PartialEq
fn eq(self: &Self, other: &Self) -> bool
- Clone
fn clone(self: &Self) -> Self
firma_login::protocol::AuthorizedTokenExchange
Section titled “firma_login::protocol::AuthorizedTokenExchange”Struct
A callback result that cannot lose its original redirect URI.
firma_login::protocol::NativeAccessGrant
Section titled “firma_login::protocol::NativeAccessGrant”Struct
The result of one token exchange. The access token is never formatted or serialized.
Fields:
workspace_id: firma_identifiers::WorkspaceId- Workspace the approval selected.membership_id: firma_identifiers::MembershipId- Membership the approval selected.
firma_login::protocol::NativeTokenClient
Section titled “firma_login::protocol::NativeTokenClient”Struct
A bounded, redirect rejecting token transport for one PKCE exchange.
Methods:
fn new(origin: &ControlPlaneOrigin) -> Result<Self, NativeTokenError>- Construct the transport from the validated Control Plane origin.fn exchange(self: &Self, exchange: AuthorizedTokenExchange) -> Result<NativeAccessGrant, NativeTokenError>- Exchange one completed callback, without retrying an uncertain request.fn revoke(self: &Self, token: &SecretString) -> Result<(), NativeTokenError>- Revokes one renewable family. Unknown and already-revoked tokens arefn prove(self: &Self, grant: NativeAccessGrant) -> Result<AuthenticatedConnection, NativeTokenError>- Make the first protected Workspace request and check it reports the
firma_login::protocol::NativeTokenError
Section titled “firma_login::protocol::NativeTokenError”Enum
A native login failure that never includes code, verifier, state, or token.
Variants:
InvalidCode- The manually entered code is not canonical.Entropy(crate::EntropyError)- Secure operating-system randomness was unavailable.FailureAndRevocationUnconfirmed{ failure: Box<Self>, revocation: Box<Self> }- An issued renewable credential could not be verified or accepted, andTransport(reqwest::Error)- The HTTP transport failed.Refused(crate::LoginRefusal)- The Control Plane refused the login with an RFC 6749 error code.Rejected(reqwest::StatusCode)- Authority rejected a native login request.InvalidResponse- Authority returned an unexpected or oversized success document.
Trait Implementations:
- Display
fn fmt(self: &Self, __formatter: & mut ::core::fmt::Formatter) -> ::core::fmt::Result
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- From
fn from(source: crate::EntropyError) -> Self
- Error
fn source(self: &Self) -> ::core::option::Option<&dyn ::thiserror::__private21::Error>
firma_login::protocol::TerminalAuthorizationRequest
Section titled “firma_login::protocol::TerminalAuthorizationRequest”Struct
One terminal-code attempt using the original PKCE verifier without a listener.
Methods:
fn with_scope(origin: &ControlPlaneOrigin, attempt: AuthorizationAttempt, scope: AuthorizationScope) -> Self- Compose the terminal request with the selected scope.fn as_url(self: &Self) -> &Url- Browser URL containing the per-attempt state.fn complete(self: Self, code: &str) -> Result<AuthorizedTokenExchange, NativeTokenError>- Pair a canonical one-time code with this attempt’s original verifier.