pub struct Assertion {
Show 13 fields pub assertion_id: String, pub issuer: String, pub signing_algorithm: SigningAlgorithm, pub digest_algorithm: DigestAlgorithm, pub issue_instant: DateTime<Utc>, pub subject_data: SubjectData, pub conditions_not_before: DateTime<Utc>, pub conditions_not_after: DateTime<Utc>, pub audience: String, pub attributes: Vec<AssertionAttribute>, pub sign_assertion: bool, pub signing_key: Option<PKey<Private>>, pub signing_cert: Option<X509>,
}
Expand description

The content of an assertion

Fields

assertion_id: String

Assertion ID, referred to in the signature as ds:Reference

issuer: String

Issuer of the Assertion

signing_algorithm: SigningAlgorithm

Signing algorithm

digest_algorithm: DigestAlgorithm

Digest algorithm

issue_instant: DateTime<Utc>

Issue/Generatino time of the Assertion

subject_data: SubjectData

TODO: work out what is necessary for SubjectData

conditions_not_before: DateTime<Utc>

Please don’t let the user do this until … now!

conditions_not_after: DateTime<Utc>

Please don’t let the user do whatever we’re saying they can do after this.

audience: String

Who/what should be reading this. Probably a crate::sp::ServiceProvider

attributes: Vec<AssertionAttribute>

Attributes of the assertion, things like groups and email addresses and phone numbers and favourite kind of 🥔🍠

sign_assertion: bool

Should we sign the assertion?

signing_key: Option<PKey<Private>>

an openssl private key for signing

signing_cert: Option<X509>

Certificate for signing/digest

Implementations

This exists so we can return a copy of an Assertion without the signature flags so we can trigger [Assertion.Into<Vec>] for signing

Build an assertion based on the Assertion, returns a String of XML.

If you set sign, it’ll sign the data.. eventually.

adds a saml:Conditions statement to the writer

This adds the data from an Assertion to a given EventWriter.

If you specify to sign the assertion, it’s going to:

  • generate a temporary EventWriter
  • generate the unsigned assertion
  • add the signature to the assertion
  • weep quietly
  • return the full pack

That’s the plan, anyway.

- AttributeStatement
- AuthnStatement
- Conditions
- Issuer
- Signature
- Subject

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

Creates a String full of XML based on the ResponsElements

Converts this type into the (usually inferred) input type.

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.