Class CapabilityGrantTokenDecodeResult
- Namespace
- AsiBackbone.Core.CapabilityGrants
- Assembly
- AsiBackbone.Core.dll
Represents the outcome of decoding a capability grant token with Decode(string?, CanonicalPayloadOptions?, int).
public sealed class CapabilityGrantTokenDecodeResult
- Inheritance
-
CapabilityGrantTokenDecodeResult
- Inherited Members
Remarks
A successful decode establishes only that the token is well formed. The decoded grant has not been verified: pass SignedGrant to ValidateAsync(SignedGovernanceArtifact<CapabilityGrant>, CapabilityGrantValidationOptions?, IGovernanceSignatureVerificationService?, ICapabilityGrantUseStore?, CancellationToken) with a proof-requiring profile before trusting any of its values.
Properties
FailureCode
Gets the machine-readable failure code, such as capability.token-malformed, when decoding failed.
public string? FailureCode { get; }
Property Value
FailureMessage
Gets a human-readable failure message, when decoding failed.
public string? FailureMessage { get; }
Property Value
Remarks
The message describes the token structure only and never echoes token content.
SignedGrant
Gets the decoded, not yet verified, signed grant when decoding succeeded.
public SignedGovernanceArtifact<CapabilityGrant>? SignedGrant { get; }
Property Value
Remarks
The canonical payload and hash are rebuilt from the decoded grant fields rather than read from the token, so a grant field edited after signing produces a hash the signature does not cover.
Succeeded
Gets a value indicating whether the token decoded into a signed grant.
public bool Succeeded { get; }