Method: HTTPClient::OAuth#get
- Defined in:
- lib/httpclient/auth.rb
#get(req) ⇒ Object
Response handler: returns credential. It sends cred only when a given uri is;
-
child page of challengeable(got *Authenticate before) uri and,
-
child page of defined credential
856 857 858 859 860 861 862 863 864 865 866 |
# File 'lib/httpclient/auth.rb', line 856 def get(req) target_uri = req.header.request_uri synchronize { return nil unless @challenge[nil] or @challenge.find { |uri, ok| Util.uri_part_of(target_uri, uri) and ok } config = do_get_config(target_uri) || @config return nil unless config calc_cred(req, config) } end |