Skip to content

Expand Test Suite #9

@aljones15

Description

@aljones15

Existing Tests are:

  token API
    create API
      authenticated request
        ��� should create a totp
        ��� should create a password
        ��� should create a nonce
        ��� should create a challenge (skipped)
      unauthenticated request
        ��� should not create a token with out "authenticationMethod"
    authenticate API
      ��� should authenticate with a password
      ��� should authenticate with a totp
      ��� should authenticate with a nonce (skipped)
  login API
    ��� should login with a totp & password

SUMMARY:
��� 7 tests completed
��� 2 tests skipped
TOTAL: 7 SUCCESS
All tests passed.

Difficulties:

  • The nonce test will need to somehow get the nonce emitted in a bedrock event.
    • bedrock.events.on('bedrock-authn-token.notify'

Untested:

  • nonce and otop login
  • nonce and password login
  • using the clientId
  • negative tests for tokenService.create such as no url
  • negative tests for login as incorrect password or nonce
  • tokenService.getSalt
  • tokenService.remove (including checking that authenticate with the removed method fails)
  • tokenService.authenticate with a clientId
  • tokenService.hashChallenge
  • tokenService.setAuthenticationRequirements
  • tokenService.getAuthenticationRequirments (this should be used to verify setAuthRequirements)
  • tokenService.setRecoveryEmail
  • tokenService.isClientRegistered (I believe this is related to the clientId)
  • loginController.authenticate (the methods that compose this have been tested, but not this method itself)
  • loginController.login

TODO:

  • Add code coverage via istanbul to the project if possible (istanbul might have trouble with karma)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions