Testing Authentication
This section tests authentication from the creation of the OAuth link to the validation of the token.
“Happy Path” Tests
Test Case | Task(s) | Expected Result(s) |
|---|---|---|
Successful creation of OAuth link | Direct end-user to the mikomo login. | Consumer goes from your app to the provider login screen. |
Valid login | Go through Akoya’s authentication flow and reach the account selection screen. | Successfully arrive at the account selection screen displaying all the user’s accounts. |
Successful account selection | Select the desired financial accounts. | Consumer selects their accounts without error. |
Successful redirect to expected redirect_uri | The app/browser takes user to the success page. | Successfully arrive at your app’s redirect URI. |
Successful retrieval of authentication code | Store the authentication code. | The Token API uses the authentication code for the next step retrieving tokens. |
Successful token validation | Use the Token endpoint to request refresh and ID tokens. | The API returns valid refresh_token and id_token tokens. These tokens associate with the mikomo consumer who logged in, the specified sandbox app, the provider (mikomo), and the selected accounts. |
“Sad Path” Tests
Test Case | Task(s) | Expected Result(s) |
|---|---|---|
Login failure (invalid connector) | Provide an invalid providerId in the auth URL for connector | HTTP 302 w/ error=server_error&error_description=client+is+not+authorized+for+the+request+audience&state=sadpath-01-bad-connector |
Login failure (no connector) | Provide connector without a value. | HTTP 302 Redirect with ?error=server_error&error_description=client+is+not+authorized+for+the+request+audience&state=sadpath-02a-empty-connector |
connector left out | Leave out the connector | HTTP 302 Redirect with error=invalid_request&state=https%3A%2F%2Frecipient.ddp.akoya.com%2Fflow%2Fcallback |
Empty redirect_uri | Leave out the redirect uri | HTTP 403 Unauthorized (Auth system attempts to fallback to itself as the redirect) error=unauthorized_client&error_description=The+redirect_uri+parameter+does+not+match+the+registered+redirect+URI+for+this+client&state=sadpath-03a-empty-redirect |
Login failure (invalid redirect_uri) | Provide an incorrect redirect_uri. | HTTP 302 to the redirect url error=unauthorized_client&error_description=The+redirect_uri+parameter+does+not+match+the+registered+redirect+URI+for+this+client&state=sadpath-03b-wrong-redirect |
Login failure (empty client ID) | Leave out the client ID | HTTP 302 with error=server_error&error_description=The+authorization+server+encountered+an+unexpected+internal+error.&state=sadpath-04a-empty-client |
Login failure (invalid client_id) | Provide an incorrect client_id. | HTTP 302 with error=server_error&error_description=The+authorization+server+encountered+an+unexpected+internal+error.&state=sadpath-04b-wrong-client |
Login failure (invalid response_type) | Provide an empty response_type. | HTTP 302 with error=unsupported_response_type&error_description=The+authorization+server+does+not+support+obtaining+a+token+using+this+method.+%60The+request+is+missing+the+%27response_type%27+parameter.&state=sadpath-05-empty-response-type |
Login failure (empty scope) | Provide an empty scope. | No error |
Login failure (invalid scope) | scope missing openid. | No error |
Login failure (incorrect username/password) | Enter incorrect user credentials. | Receive an error message in the UI that the consumer's username and/or password is incorrect. |