adapter_get-authorization-header.feature 930 Bytes
Newer Older
1 2
Feature: Can the adapter create an authorization header?
  The adapter getAuthorizationHeader method works as expected
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

  Scenario: getAuthorizationHeader returns a bearer token
    Given valid config
    When the adapter instance is created
    When the auth method is called
    When the getAuthorizationHeader method is called
    Then a headers object is returned containing a bearer token authorization header

  Scenario: getAuthorizationHeader implicitly calls auth if required
    Given valid config
    When the adapter instance is created
    When the getAuthorizationHeader method is called
    Then a headers object is returned containing a bearer token authorization header

  Scenario: getAuthorizationHeader implicitly calls auth if required
    Given invalid config
    When the adapter instance is created
    When the getAuthorizationHeader method is called
    Then an error response is returned with status 403