Module: Saml::Kit::Bindings
- Defined in:
- lib/saml/kit/bindings.rb,
lib/saml/kit/bindings/binding.rb,
lib/saml/kit/bindings/http_post.rb,
lib/saml/kit/bindings/url_builder.rb,
lib/saml/kit/bindings/http_redirect.rb
Defined Under Namespace
Classes: Binding, HttpPost, HttpRedirect, UrlBuilder
Constant Summary
collapse
- HTTP_ARTIFACT =
'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact'
- HTTP_POST =
"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
- HTTP_REDIRECT =
"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
- ALL =
{
http_post: HTTP_POST,
http_redirect: HTTP_REDIRECT,
http_artifact: HTTP_ARTIFACT,
}
Class Method Summary
collapse
Class Method Details
.binding_for(binding) ⇒ Object
18
19
20
|
# File 'lib/saml/kit/bindings.rb', line 18
def self.binding_for(binding)
ALL[binding]
end
|
.create_for(binding, location) ⇒ Object
33
34
35
36
37
38
39
40
41
42
|
# File 'lib/saml/kit/bindings.rb', line 33
def self.create_for(binding, location)
case binding
when HTTP_REDIRECT
HttpRedirect.new(location: location)
when HTTP_POST
HttpPost.new(location: location)
else
Binding.new(binding: binding, location: location)
end
end
|
.to_symbol(binding) ⇒ Object
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/saml/kit/bindings.rb', line 22
def self.to_symbol(binding)
case binding
when HTTP_REDIRECT
:http_redirect
when HTTP_POST
:http_post
else
binding
end
end
|