adapter_get-authorization-header.feature 927 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Feature: Does the adapter authenticate?
  When an adapter instance is created it authenticates and receives a token

  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