Method: Mechanize::HTTP::WWWAuthenticateParser#auth_param
- Defined in:
- lib/mechanize/http/www_authenticate_parser.rb
#auth_param ⇒ Object
auth-param = token “=” ( token | quoted-string )
Parses an auth parameter
129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/mechanize/http/www_authenticate_parser.rb', line 129 def auth_param return nil unless name = token return nil unless @scanner.scan(/ *= */) value = if @scanner.peek(1) == '"' then quoted_string else token end return nil unless value return name, value end |