Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface EndpointSecurity

Security interface for Raincatcher authentication middleware Contains all the methods that should be used to protect express routes.

Hierarchy

  • EndpointSecurity

Index

Methods

Methods

protect

  • protect(role?: undefined | string): express.Handler
  • Function which checks if the user requesting access to the resource is authenticated and authorized to access the resource. Redirects to the login page if user is not authenticated or returns a status of 403 if the user does not have the required role.

    Parameters

    • Optional role: undefined | string

      Role which the user needs in order to access this resource

    Returns express.Handler

Generated using TypeDoc