mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-05-30 15:30:08 +00:00
store and display deSEC password for user login at desec.io
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/4e99bcbc-4f32-45e6-af08-5026ce4b1f45 Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
83129d6a55
commit
cb48bc5db0
@@ -221,6 +221,22 @@ class ConfigurationManager
|
||||
: '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Stores the deSEC account password in the secrets store so the user can log in at desec.io.
|
||||
*/
|
||||
public function setDesecPassword(string $password): void {
|
||||
$secrets = $this->get('secrets', []);
|
||||
$secrets['DESEC_PASSWORD'] = $password;
|
||||
$this->set('secrets', $secrets);
|
||||
}
|
||||
|
||||
public function getDesecPassword(): string {
|
||||
$secrets = $this->get('secrets', []);
|
||||
return isset($secrets['DESEC_PASSWORD']) && is_string($secrets['DESEC_PASSWORD'])
|
||||
? $secrets['DESEC_PASSWORD']
|
||||
: '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true when the configured domain is a deSEC dedyn.io subdomain and a token is stored.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user