Struct saml_rs::response::ResponseElements
source · [−]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: ServiceProvider
assertion_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: StatusCode
crate::constants::StatusCode of the response
sign_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
sourceimpl ResponseElements
impl ResponseElements
sourcepub fn base64_encoded_response(self) -> Vec<u8>
pub fn base64_encoded_response(self) -> Vec<u8>
returns the base64 encoded version of a ResponseElements
sourcepub fn default() -> Self
pub fn default() -> Self
Default values, mostly so I can pull out a default assertion ID somewhere else, for now TODO: ResponseElements::default, yes.
sourcepub fn regenerate_response_id(self) -> Self
pub fn regenerate_response_id(self) -> Self
generate a response ID, which will be the issuer and uuid concatentated