StaticFileAuthenticationSource class final

Authentication source backed by a JSON file.

The file may either be a token map directly or contain it under tokens:

{
  "tokens": {
    "secret": {"userId": "alice", "canCreateRooms": true},
    "another-secret": "bob"
  }
}

The file is reloaded when its modification time changes.

Inheritance

Constructors

StaticFileAuthenticationSource(String path)

Properties

file → File
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

authenticate(AuthenticationRequest request) → Future<AuthenticatedUser?>
override
close() → Future<void>
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited