MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / GetToken

Method GetToken

sdks/csharp/src/AuthToken.cs:59–67  ·  view source on GitHub ↗
(string? keySuffix = null)

Source from the content-addressed store, hash-verified

57 private static ConfigFile Config => _config ??= new ConfigFile();
58
59 public static string GetToken(string? keySuffix = null)
60 {
61 var key = GetKey(keySuffix);
62 if(!Config.HasSectionKey(Section, key))
63 {
64 Config.Load(Path);
65 }
66 return Config.GetValue(Section, key, "").As<string>();
67 }
68 public static bool TryGetToken(out string result) => TryGetToken(null, out result);
69 public static bool TryGetToken(string? keySuffix, out string result) {
70 result = GetToken(keySuffix);

Callers

nothing calls this directly

Calls 1

LoadMethod · 0.80

Tested by

no test coverage detected