MCPcopy Create free account
hub / github.com/Selectively11/CloudRedirect / parseTokenPath

Function parseTokenPath

ui-linux/src/oauthservice.cpp:128–136  ·  view source on GitHub ↗

Extract provider and account from token path Path format: ~/.config/CloudRedirect/tokens/{provider}_{account}.json

Source from the content-addressed store, hash-verified

126// Extract provider and account from token path
127// Path format: ~/.config/CloudRedirect/tokens/{provider}_{account}.json
128static bool parseTokenPath(const QString& path, QString& provider, QString& account) {
129 QFileInfo fi(path);
130 QString basename = fi.baseName(); // e.g., "gdrive_12345678"
131 int sep = basename.indexOf('_');
132 if (sep < 0) return false;
133 provider = basename.left(sep);
134 account = basename.mid(sep + 1);
135 return !provider.isEmpty() && !account.isEmpty();
136}
137
138OAuthService::OAuthService(QObject *parent) : QObject(parent) {}
139

Callers 1

exchangeCodeForTokensMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected