CredentialStore class
On-disk store of Hub logins, keyed by Hub URL, with a remembered default.
Persisted to <home>/.omnyshell/credentials.json (file mode 600). The home
directory resolves from OMNYSHELL_HOME, then HOME, then USERPROFILE.
Constructors
-
CredentialStore({String? defaultHub, Map<
String, StoredSession> ? sessions})
Properties
- defaultHub ↔ String?
-
The Hub URL used when a command does not specify
--hub.getter/setter pair - hashCode → int
-
The hash code for this object.
no setterinherited
-
hubs
→ List<
String> -
The saved Hub URLs, sorted, so listings and pickers are stable.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sessions
→ Map<
String, StoredSession> -
Saved sessions keyed by Hub URL.
final
Methods
-
matchHubs(
String hub) → List< String> -
Every saved Hub URL that
hubcould refer to, sorted. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolveHub(
String hub) → String? -
The single saved Hub URL
hubrefers to, or null when it matches none or is ambiguous — matchHubs tells the two apart. -
save(
{String? home}) → Future< void> -
Persists the store, creating
~/.omnyshell(mode700) and writing the file with mode600on POSIX systems. -
selectDefaultHub(
String hub) → String? -
Points defaultHub at the saved session
hubrefers to. -
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited