pub struct ResponseElements {
Show 16 fields pub response_id: String, pub issue_instant: DateTime<Utc>, pub destination: String, pub relay_state: String, pub issuer: String, pub attributes: Vec<AssertionAttribute>, pub authnstatement: AuthNStatement, pub assertion_id: String, pub service_provider: ServiceProvider, pub assertion_consumer_service: Option<String>, pub session_length_seconds: u32, pub status: StatusCode, pub sign_assertion: bool, pub sign_message: bool, pub signing_key: Option<PKey<Private>>, pub signing_cert: Option<X509>,
}
Expand description

Stores all the required elements of a SAML response… maybe?

Fields

response_id: String

ID of the response TODO: Figure out the rules for generating this

issue_instant: DateTime<Utc>

Issue time of the response

destination: String

Destination endpoint of the request

relay_state: String

RelayState from the original AuthN request

issuer: String

Issuer of the resposne?

attributes: Vec<AssertionAttribute>

A list of relevant AssertionAttributes

authnstatement: AuthNStatement

The AuthNStatement itself

assertion_id: String

ID Of the assertion

service_provider: ServiceProviderassertion_consumer_service: Option<String>

TODO: Decide if we can just pick it from the SP

session_length_seconds: u32

Session length in seconds, 4294967295 should be enough for anyone! The default value is 60.

status: StatusCodesign_assertion: bool

Should we sign the assertion?

sign_message: bool

Should we sign the message?

signing_key: Option<PKey<Private>>

an openssl private key for signing

signing_cert: Option<X509>

The signing certificate

Implementations

returns the base64 encoded version of a ResponseElements

Default values, mostly so I can pull out a default assertion ID somewhere else, for now TODO: ResponseElements::default, yes.

generate a response ID, which will be the issuer and uuid concatentated

Trait Implementations

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