| 398 | } |
| 399 | |
| 400 | QJSValue BridgeApp::credentials() const |
| 401 | { |
| 402 | QVariantMap list; |
| 403 | auto vecCreds = scriptEngine->manager()->GetCredentials(); |
| 404 | |
| 405 | for (const auto& cred : vecCreds) { |
| 406 | QVariantMap map; |
| 407 | map["id"] = cred.CredId; |
| 408 | map["username"] = cred.Username; |
| 409 | map["password"] = cred.Password; |
| 410 | map["realm"] = cred.Realm; |
| 411 | map["type"] = cred.Type; |
| 412 | map["tag"] = cred.Tag; |
| 413 | map["date"] = cred.Date; |
| 414 | map["storage"] = cred.Storage; |
| 415 | map["agent_id"] = cred.AgentId; |
| 416 | map["host"] = cred.Host; |
| 417 | |
| 418 | list[cred.CredId] = map; |
| 419 | } |
| 420 | |
| 421 | return this->scriptEngine->engine()->toScriptValue(list); |
| 422 | } |
| 423 | |
| 424 | void BridgeApp::credentials_add(const QString &username, const QString &password, const QString &realm, const QString &type, const QString &tag, const QString &storage, const QString &host) |
| 425 | { |
nothing calls this directly
no test coverage detected