Struct saml_rs::sp::ServiceProvider
source · [−]pub struct ServiceProvider {
pub entity_id: String,
pub authn_requests_signed: bool,
pub want_assertions_signed: bool,
pub x509_certificate: Option<X509>,
pub services: Vec<ServiceBinding>,
pub protocol_support_enumeration: Option<String>,
pub nameid_format: NameIdFormat,
}
Expand description
SP metadata object, used for being able to find one when an AuthN request comes in (or IdP-initiated, eventually, maymbe?)
Fields
entity_id: String
EntityID
authn_requests_signed: bool
Will this SP send signed requests? If so, we’ll reject ones that aren’t.
want_assertions_signed: bool
Does this SP expect signed assertions?
x509_certificate: Option<X509>
The signing (public) certificate for the SP
services: Vec<ServiceBinding>
SP Services
protocol_support_enumeration: Option<String>
TODO protocol_support_enumeration? what’s this?
nameid_format: NameIdFormat
NameIdFormat - how we should identify the user
Implementations
sourceimpl ServiceProvider
impl ServiceProvider
sourcepub fn test_generic(entity_id: &str) -> Self
pub fn test_generic(entity_id: &str) -> Self
Generate a test generic ServiceProvider with nonsense values for testing
sourcefn service_attrib_parser(
&mut self,
servicetype: SamlBindingType,
attributes: Vec<OwnedAttribute>
) -> Result<ServiceBinding, String>
fn service_attrib_parser(
&mut self,
servicetype: SamlBindingType,
attributes: Vec<OwnedAttribute>
) -> Result<ServiceBinding, String>
Used for handling the attributes of services in the tags of an SP Metadata XML file
Types tested (poorly):
- AssertionConsumerService
- SingleLogoutService
sourcepub fn find_first_acs(&self) -> Result<ServiceBinding, &'static str>
pub fn find_first_acs(&self) -> Result<ServiceBinding, &'static str>
return the first AssertionConsumerService we find
sourcefn attrib_parser(
&mut self,
tag: &str,
attributes: Vec<OwnedAttribute>,
upstream_tag: &str
)
fn attrib_parser(
&mut self,
tag: &str,
attributes: Vec<OwnedAttribute>,
upstream_tag: &str
)
Let’s parse some attributes!
Trait Implementations
sourceimpl Clone for ServiceProvider
impl Clone for ServiceProvider
sourcefn clone(&self) -> ServiceProvider
fn clone(&self) -> ServiceProvider
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for ServiceProvider
impl Debug for ServiceProvider
Auto Trait Implementations
impl RefUnwindSafe for ServiceProvider
impl Send for ServiceProvider
impl Sync for ServiceProvider
impl Unpin for ServiceProvider
impl UnwindSafe for ServiceProvider
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more