-
Notifications
You must be signed in to change notification settings - Fork 67
Authentication system
The authentication system is based on the HTTP authentication system.
It uses the Authorization
and WWW-Authenticate
headers to provide authentication.
At the moment, only two authentication systems are available :
- Basic
- Digest
Thanks to the server's option httpAuthentication
, it is possible to define a custom authentication system.
It musts inherit from the interface HTTPAuthentication
:
interface HTTPAuthentication
{
realm : string
askForAuthentication() : any
getUser(arg : MethodCallArgs, userManager : IUserManager, callback : (error : Error, user : IUser) => void)
}
The askForAuthentication()
method is used by the server to know what headers the method needs to add to its response.
The getUser()
method is used by the server to get the user of the current request.
There are two authentication system implemented in the modules : HTTPBasicAuthentication
and HTTPDigestAuthentication
.
The class HTTPBasicAuthentication
implements the Basic
authentication system.
The class HTTPDigestAuthentication
implements the Digest
authentication system and provides a more secure way to authenticate.
- Home
- Version 2
- Install
- Quick Start Guide
- Examples
- Concepts
- User concepts
- Server concepts
- Customizing
- Version 1 [Obsolete]
- Install
- Quick Start Guide
- Examples
- Features
- Resource concepts
- User concepts
- Server concepts
- Customizing
- Project