Class: Wssec::Configuration
- Inherits:
-
Object
- Object
- Wssec::Configuration
- Defined in:
- lib/wssec/configuration.rb
Overview
Holds the protocol-level defaults a WS-Security signature is built from:
namespace URIs, algorithm identifiers, token types and the timestamp TTL.
Every value ships with a standards-compliant default and can be overridden
globally via Wssec.configure (see rails g wssec:install) or per-signer.
Constant Summary collapse
- DEFAULT_NAMESPACES =
{ wsse: "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", wsu: "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd", soapenv: "http://schemas.xmlsoap.org/soap/envelope/", ds: "http://www.w3.org/2000/09/xmldsig#" }.freeze
- DEFAULT_EXC_C14N =
"http://www.w3.org/2001/10/xml-exc-c14n#"- DEFAULT_SIGNATURE_METHOD =
"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"- DEFAULT_DIGEST_METHOD =
"http://www.w3.org/2001/04/xmlenc#sha256"- DEFAULT_ENCODING_TYPE =
"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"- DEFAULT_VALUE_TYPE =
"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"- DEFAULT_TIMESTAMP_TTL =
seconds
300
Instance Attribute Summary collapse
-
#digest_method ⇒ Object
Returns the value of attribute digest_method.
-
#encoding_type ⇒ Object
Returns the value of attribute encoding_type.
-
#exc_c14n ⇒ Object
Returns the value of attribute exc_c14n.
-
#namespaces ⇒ Object
Returns the value of attribute namespaces.
-
#signature_method ⇒ Object
Returns the value of attribute signature_method.
-
#timestamp_ttl ⇒ Object
Returns the value of attribute timestamp_ttl.
-
#value_type ⇒ Object
Returns the value of attribute value_type.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
24 25 26 27 28 29 30 31 32 |
# File 'lib/wssec/configuration.rb', line 24 def initialize @namespaces = DEFAULT_NAMESPACES.dup @exc_c14n = DEFAULT_EXC_C14N @signature_method = DEFAULT_SIGNATURE_METHOD @digest_method = DEFAULT_DIGEST_METHOD @encoding_type = DEFAULT_ENCODING_TYPE @value_type = DEFAULT_VALUE_TYPE @timestamp_ttl = DEFAULT_TIMESTAMP_TTL end |
Instance Attribute Details
#digest_method ⇒ Object
Returns the value of attribute digest_method.
21 22 23 |
# File 'lib/wssec/configuration.rb', line 21 def digest_method @digest_method end |
#encoding_type ⇒ Object
Returns the value of attribute encoding_type.
21 22 23 |
# File 'lib/wssec/configuration.rb', line 21 def encoding_type @encoding_type end |
#exc_c14n ⇒ Object
Returns the value of attribute exc_c14n.
21 22 23 |
# File 'lib/wssec/configuration.rb', line 21 def exc_c14n @exc_c14n end |
#namespaces ⇒ Object
Returns the value of attribute namespaces.
21 22 23 |
# File 'lib/wssec/configuration.rb', line 21 def namespaces @namespaces end |
#signature_method ⇒ Object
Returns the value of attribute signature_method.
21 22 23 |
# File 'lib/wssec/configuration.rb', line 21 def signature_method @signature_method end |
#timestamp_ttl ⇒ Object
Returns the value of attribute timestamp_ttl.
21 22 23 |
# File 'lib/wssec/configuration.rb', line 21 def @timestamp_ttl end |
#value_type ⇒ Object
Returns the value of attribute value_type.
21 22 23 |
# File 'lib/wssec/configuration.rb', line 21 def value_type @value_type end |