Module: Onelogin::Saml::Codeing
- Included in:
- Authrequest, Logoutrequest, Logoutresponse, Response
- Defined in:
- lib/onelogin/saml/codeing.rb
Instance Method Summary collapse
- #decode(encoded) ⇒ Object
- #deflate(inflated) ⇒ Object
- #encode(encoded) ⇒ Object
- #escape(unescaped) ⇒ Object
- #inflate(deflated) ⇒ Object
- #unescape(escaped) ⇒ Object
Instance Method Details
#decode(encoded) ⇒ Object
7 8 9 |
# File 'lib/onelogin/saml/codeing.rb', line 7 def decode(encoded) Base64.decode64(encoded) end |
#deflate(inflated) ⇒ Object
28 29 30 |
# File 'lib/onelogin/saml/codeing.rb', line 28 def deflate(inflated) Zlib::Deflate.deflate(inflated, 9)[2..-5] end |
#encode(encoded) ⇒ Object
11 12 13 |
# File 'lib/onelogin/saml/codeing.rb', line 11 def encode(encoded) Base64.encode64(encoded) end |
#escape(unescaped) ⇒ Object
15 16 17 |
# File 'lib/onelogin/saml/codeing.rb', line 15 def escape(unescaped) CGI.escape(unescaped) end |
#inflate(deflated) ⇒ Object
23 24 25 26 |
# File 'lib/onelogin/saml/codeing.rb', line 23 def inflate(deflated) zlib = Zlib::Inflate.new(-Zlib::MAX_WBITS) zlib.inflate(deflated) end |
#unescape(escaped) ⇒ Object
19 20 21 |
# File 'lib/onelogin/saml/codeing.rb', line 19 def unescape(escaped) CGI.unescape(escaped) end |