Unverified Commit c79d193c authored by Patrizio Bekerle's avatar Patrizio Bekerle
Browse files

Also return webdavUrl in postMessage (#13)

parent 0eee4dc7
Pipeline #14941 passed with stage
in 40 seconds
# WebAppPassword Change Log
## 20.12.1
- Now the `webdavUrl` will be returned by `postMessage` to prevent issues if the UID doesn't match the loginName
(for [#13](https://gitlab.tugraz.at/dbp/nextcloud/webapppassword/-/issues/13))
## 20.12.0
- Leading and trailing whitespaces will now be automatically trimmed from the origins
......
......@@ -13,7 +13,7 @@ that uses this app to generate a temporary password and make a WebDAV request to
See [Example](https://gitlab.tugraz.at/dbp/nextcloud/webapppassword#example) for a Nextcloud WebDAV file picker example
that uses this application.]]></description>
<version>20.12.0</version>
<version>20.12.1</version>
<licence>agpl</licence>
<author mail="patrizio.bekerle@tugraz.at">Patrizio Bekerle</author>
<namespace>WebAppPassword</namespace>
......
{
"hashes": {
"CHANGELOG.md": "b97417214183cd0e7344f15c3a34e03c7a349bc9238003ff4597f1b014e35404f9ab7c3746dc293ab551798758ca3341c27b7dd92ba52a17c36bac8a1aace285",
"CHANGELOG.md": "b549ddd74979d198fe134fb29a3d9340d9f15a4b803bc656ba24b56bd82f1fd81d468dd6c007b0a27ff6b1f9f1d6061c3c8c1342908f43aab6544980188ecdc9",
"COPYING": "a0a86214ea153fb07ff35ceec0848dd1703eae22de036a825efc8394e50f65e3044832f3b49cf7e45a39edc470bdf738abc36a3a78ca7df3a6e73c14eaef94a8",
"README.md": "951132925e23f259e681c56b649bc1cca27a485ab19591a3a25c82300848b438c385c406c7b52c5eaa501dba35dd28d21b6e33616bb48052ada317f4d2d9fe60",
"README.md": "d86d21e732e2e50442f7ce85b9c22d60e81ad91e1e705ce426a1e4ba0fe0ebd8a15ab37bbc6e6b99804cd2194e349b2ad85d7ef4791ff03d7a7367516fd7c734",
"appinfo\/app.php": "51717f154f182482316b03d73b7c80d34eda8cdb299b4d56aabc5ed291b73ce563c82356c828529d7856139d87920bdee6a077a427d8b7cfbe8bc38d998759a4",
"appinfo\/info.xml": "fbda640b294f41bc5fbb5b3d148abcfd722c2c7f2a39230bde3e7ffb2aba7c75bad13e5206a9574e3bed752086c19929be87e4d62a5a6590bfd5f1e1d272f9b7",
"appinfo\/info.xml": "d21ca8ce87285dde71a51adc62502643157c24f09e7ceb70e7e2e3f3c17b8f0ec7d48d6b68d1d4bb4cf7b1fb029a36bef4d73e3d629f7632f5d8bb75a6ec7c7f",
"appinfo\/routes.php": "04d324a995c5e9282c911b16a38fafce1e126bfe34d34bce21b74c5ceb5cf1fbc1dd684c1d581bd3011f3f1bacfb789b8957a62b574e9172f027cce0c74d9750",
"composer.json": "7e4dda7f78ca3d0775dd905d9e05d014a586bc3c0e60fda641111710557bee70b624651261ade0026e76634908feeb0c984e135b13339578af9079416f0555b0",
"composer.lock": "b1c27528aadeb4f189bbcd9c7836f6f65a8e44bcc80e090d1a3a999fd8e6e5f7f8d7081c4710a7df4e41986c874c57788a7ba4e4f5d1d4aa0fd7e761611c83d5",
......@@ -13,14 +13,14 @@
"img\/app-dark.svg": "ae335fb7de2555e03a679c12203514d6aa235eea65275a308e906526ca681cb0715023cf8c7c2e7f4e2e7fd78e1c97ffd50119e6e3db43f9ac62b3c0b38989cc",
"img\/app.svg": "726cd826f3a54a3ef9f76ace36ec4b210c993a54e0d4396c53c381152ef96d5536262c2ae55f4ec2c3f26fc5b9b941701504b055835df6f8bf7ec02e8aba3fac",
"js\/admin.js": "bcd58230b4752f22bd5bfad363c0c0e0f88ddc1e0b0f5d31fb39029a0e39587da3378b9aee9245e00478a37459fa141bc56c19cab7064c5d10304a685d25de0e",
"js\/script.js": "78bbdfc514c586f55a896f0aeca2f144e899381b20ef23fb0aa3cb9536c00248519661bfcff0dccaf638738113103d231248d52526ae1fbe2eab26c5e65b6ccf",
"js\/script.js": "458b0dc4adb78570437f7e8356e8e2d75c9af153ae585db16182e3724e11b4c3cd3960621e3af1baa43f03582515d1f3ced7e7c7ed5cc08721b6c63b63eb63e9",
"l10n\/de.js": "f0de49654f57ead9117c4aca5631d8c199a3f3785d56ca5898aff2306e387bb7fc02227c9c4a18750afecea07bc703f811398f3d0e4465d44ea43fb199471f4d",
"l10n\/de.json": "9f2a79a47532d32c809db7c47ccd2ca49fd6e38edc6b76da2e36d6ce982d23367811ebf42e986351b21e8e93c4e37dac4c46e696da1d3a9cfaaf9f79a4cf76d2",
"lib\/AppInfo\/Application.php": "ec244ea791f31366364bf6c325007263a0c1fc16180cc2331eac9b49e9eb04232342c7c15c72800290dd6294f4a3f40c1697603f86949f1e041a0e1a719c2ec5",
"lib\/Config\/Config.php": "5b0448a1cc9f95e37dba4a3b73ce0373eb60f07acdd505ad4cef76630c68aed2ce95c43deadcf932e7d8dc7cb3993b60f577c094c866d217af3270feb8c7f288",
"lib\/Connector\/Sabre\/CorsPlugin.php": "4f4ca0f9f88c338442ba93c10b880db1583db611aefea21a306fe58ab8f358071b3330b04444d68d0514ab0526dba8f6a96ed5c94ec11b1019d08654cc6aad4e",
"lib\/Controller\/AdminController.php": "25d00c2e2bb00880b73faf34e831d49af30750bbb15b03770093741376bff41fbb2b038717896b0c3b1b79aac51a5a9517cbbfbb02e381143a3ce876c43b0ceb",
"lib\/Controller\/PageController.php": "cefa5b3582139d9a20d88f9fbfcd9307bfa4ee52bf51b3a2c8d2f779efcdf99a702ca672cd8dbf6e161951a55a9d89f4a0063775b7dc99b83f7ef35c8b1bfa27",
"lib\/Controller\/PageController.php": "b55831f4c962c42e6e34b3d0bafc567b0d9bd958efff0cf727a644f0ecec4b8527b145858f2a316371f62321a05dc551ed10dc4b7b4fb57ba44a8a6cc5cb3790",
"lib\/Settings\/Admin.php": "8c52fea6006f6eea0b788e0b774f02104e4843c04c62f9fe3c2cd7ec4fba8e5aa0253b8f8e8bf473a274443bb6fa1e33d7ef373a2e07a8b527db4d50f6486259",
"lib\/Settings\/Section.php": "d646555383d12f2b1002ae66c6484ccfe4b008371d757ba70e3f5559426b9c17396428729fdfcac76231dd377102ef2c36b881f328369862a8ebbd86f09319e7",
"lib\/Utility\/PsrLogger.php": "6097490dfa89e83f8046dc0b348e67b316a256d6f9f3190cb8272ffbc65fb5e6341c11ff50ec6db73500ee5ef093627dd2088b1d51b9e2ff5fc9964b5a1e21bf",
......@@ -31,6 +31,6 @@
"translationfiles\/de\/webapppassword.po": "1aabeca50463f5dc535bb548aff1169a2f666bb91c49a8cf2eca99b1532fb30fa293ee48955e8597d622de52fae91928bcdee7beae81a6c50671a32a85150251",
"translationfiles\/templates\/webapppassword.pot": "96ef45918beed49544cfe7079e186b2117d4ea296d1b562531625a8091cbcaef92413f75a42a3f9c5ba22a90240e39b392d5b5d3962652765504d527add969fb"
},
"signature": "TgUJW3CK4gd8yeVBCvXFOFarScJPQ\/j0Ot7M3ywB+eRn9jvjpTgNSfxZsgHXaGFA99NnhIreMqctrQnP14vKyGzHYr8mcKY\/MrBfiSuHQ0LE6e6KnHpRNMgf+rZNuICUQGd\/B0I+RfZCUiFRSnfB7C0E1atdUx8pW+Up0oV55FVImUkkUfDRYgtWN3Of9she8AamU\/ADnWp5ixDa8i8DX1skC9g1Q+3yd8T+\/68PfiG6YcCSEzkwWRL1PKS75ZusTMe9u4I7IMssB546fIcqyfPvRwQZnRkqDJeX64HuA6zjWWvJ7NgZ6NndCD4CXPT\/HPOsEdRt\/v7vAozc9GRhl8oydFmRuqlwSNtey0yHnbDfa5rRmlGTngXBDc2kVAioIsnZSCrYTCfeeLK\/4b1d3Oa0ebc7c6FhSWsHoZr6B8Hli+hYYBfgbcvyVzUdAsYEh9xHPYLgja79kc3\/FmqSliJdDLnoU0JHkE+9lkofw0ITUNqvYZjW+1mHpMoYZJy0nzdvM31S\/ykWSh6gktttgs3APnxlkyTaFFGVZgRQA5F0L67yK2SVcb8qU4ezjjCf\/nO9tuPD4wuFj7A4YFnAJjqNWE6LK96\/Oe2OgEHIc83vKCEAGhgJbROlKrfGn8u8PRSM1eLetSTLZZ2s908+rxUfYaObASX7LO3X8aNGDPM=",
"signature": "Zuvzm8qJvevJEUml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HPQ6U=\r\n-----END CERTIFICATE-----"
}
\ No newline at end of file
......@@ -13,7 +13,7 @@ fetch(apiUrl, {
.then(response => response.json())
.then((data) => {
// console.log("data", data);
const message = {"type": "webapppassword", "loginName": data.loginName, "token": data.token};
const message = {"type": "webapppassword", "loginName": data.loginName, "token": data.token, "webdavUrl": data.webdavUrl};
window.opener.postMessage(message, targetOrigin);
// console.log("targetOrigin", targetOrigin);
// console.log("message", message);
......
......@@ -167,6 +167,12 @@ class PageController extends Controller
IToken::DO_NOT_REMEMBER
);
return new DataResponse(['loginName' => $loginName, 'token' => $token]);
return new DataResponse(
[
'loginName' => $loginName,
'token' => $token,
'webdavUrl' => \OCP\Util::linkToRemote('dav/files/' . $uid),
]
);
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment