PasswordManager class

Keeps track of passwords used by the server. Passwords are loaded from the config/passwords.yaml file.

Constructors

PasswordManager({required String runMode})
Creates a new PasswordManager for the specified runMode. Typically, this is automatically created by the Serverpod.

Properties

hashCode int
The hash code for this object.
no setterinherited
runMode String
The run mode the passwords are loaded from.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

loadPasswords([String passwordsFilePath = 'config/passwords.yaml']) Map<String, String>
Load all passwords for the current run mode, or null if passwords fail to load.
loadPasswordsFromMap(Map passwordConfig, {Map<String, String> environment = const {}}) Map<String, String>
Load all passwords for the current run mode from the supplied Map, or null if passwords fail to load.
mergePasswords(List<({String alias, String envName})> config, Map<String, String> passwords, {Map<String, String> environment = const {}}) Map<String, String>
Merge custom passwords with the existing password collection. Custom passwords are loaded from the environment variables. Throws an ArgumentError if the custom password configuration contains reserved keywords
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