Naviga ID
Docs Home
Infomaker
Naviga
Search…
Introduction
Release notes
Architecture
Authorization schema
Integrations
Customer Integration
Service Integration
Services
Admin API
IMSG
Shared modules
Http Test Server
Service Authorization Lib
Authorize
Errors
ExpressMiddleware
TokenUtils
Hapi plugin
ServiceAuthorizationError
AccessDenied
Unauthorized
ConfigError
Client Credentials
Managing Applications
Internal Naviga ID Docs
Access Token
Fetching and using Access Tokens
Validate Access Tokens
Local development
Local HTTPS support
Post Mortem
Broken backwards compatibility in access token service for client credentials, 20th Dec 2021
Powered By
GitBook
Unauthorized
Unauthorized⇐
ServiceAuthorizationError
Unauthorized - extending the ServiceAuthorizationError error class
PublicMessage is set to 'Unauthorized' and the HttpCode is set to '401'.
Thrown when a user tries to request an endpoint with no access to it.
Extends
:
ServiceAuthorizationError
new Unauthorized(publicData, internalData)
Param
Type
Description
publicData
Object
Required -
Data to show in the error
internalData
Object
Required -
Private data that can be logged in the error
hapiReply(replyOrResponseToolkit, [extraPublicData]) ⇒
Object
Reply function to respond with the error
Overrides
:
ServiceAuthorizationError#hapiReply
Returns
:
Object
- Response - Response object
Param
Type
Default
Description
replyOrResponseToolkit
Object
Required -
Response toolkit - For example 'h' in Hapi, which handles the response
extraPublicData
Object
{}
Extra public data to shown in the error message
Previous
AccessDenied
Next
ConfigError
Last modified
2yr ago
Export as PDF
Copy link
Contents
Unauthorized⇐ ServiceAuthorizationError
new Unauthorized(publicData, internalData)
hapiReply(replyOrResponseToolkit, [extraPublicData]) ⇒ Object