File: digest_authentication.feature

package info (click to toggle)
ruby-httparty 0.13.7-1%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 736 kB
  • sloc: ruby: 4,741; xml: 425; sh: 35; makefile: 11
file content (30 lines) | stat: -rw-r--r-- 1,612 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Feature:  Digest Authentication

  As a developer
  I want to be able to use a service that requires Digest Authentication
  Because that is not an uncommon requirement

  Scenario: Passing no credentials to a page requiring Digest Authentication
    Given a restricted page at '/digest_auth.html'
    When I call HTTParty#get with '/digest_auth.html'
    Then it should return a response with a 401 response code

  Scenario: Passing proper credentials to a page requiring Digest Authentication
    Given a remote service that returns 'Digest Authenticated Page'
    And that service is accessed at the path '/digest_auth.html'
    And that service is protected by Digest Authentication
    And that service requires the username 'jcash' with the password 'maninblack'
    When I call HTTParty#get with '/digest_auth.html' and a digest_auth hash:
       | username | password   |
       | jcash    | maninblack |
    Then the return value should match 'Digest Authenticated Page'

  Scenario: Passing proper credentials to a page requiring Digest Authentication using md5-sess algorithm
    Given a remote service that returns 'Digest Authenticated Page Using MD5-sess'
    And that service is accessed at the path '/digest_auth.html'
    And that service is protected by MD5-sess Digest Authentication
    And that service requires the username 'jcash' with the password 'maninblack'
    When I call HTTParty#get with '/digest_auth.html' and a digest_auth hash:
       | username | password   |
       | jcash    | maninblack |
    Then the return value should match 'Digest Authenticated Page Using MD5-sess'