Expand description
Being let in.
With security switched on, a device asks for a token and a human approves it once:
POST /signalk/v1/access/requestswith a client id, a description and the permissions wanted. Answers202with a request id.GET /signalk/v1/requests/<id>–PENDINGuntil somebody decides.- The administrator approves it in the server’s own interface.
- The same GET then answers
COMPLETEDand carries the token.
The token goes in an Authorization: Bearer header afterwards and is
good for as long as the administrator said. Storing it is the
application’s business, not this crate’s.
§Whether a token is needed to read at all
With security on, the REST interface refuses an unauthenticated
request with 401. The data stream is governed separately, by the
server’s allowReadonly setting: it decides whether a device can
draw a chart before anybody has approved it. Publishing routes
always needs a token either way.
When allowReadonly is off, an unauthenticated client still
connects and still receives the greeting, complete with the
vessel’s identifier, then receives nothing further – indistinguishable
on the wire from a boat whose instruments are switched off. A client
with no token should report that itself rather than wait to be
told, since it never will be.
Structs§
- Pending
Request - A request that is now in front of whoever administers the server.
Enums§
- Access
- Where a request has got to.
- Permissions
- What the mariner is asking to be allowed to do.
- Requested
- What became of asking for access.
Functions§
- check_
access - Asks what became of a request.
- request_
access - Asks a server for a token.