hicsail/anchor

Anchor API Auth

gregfrasco opened this issue · 1 comments

Add Authentication Checks into Pre Routes.

Should check authentication with basic and session if Model.routes[route].auth is equal to true

Pre Methods

  • authEnabled - is auth enabled
  • simple - simple auth test runs in parallel with other auth tests. Return creds or null - doesn't throw an error
  • session - session auth test runs in parallel with other auth tests. Return creds or null - doesn't throw an error
  • credentials - check if any auth pres is valid and returns a creds object (user and session) or throws error if all failed 401 unauthicated

Closing in #157