Show the last 5 characters of the token secrets on the user settings page to make identification of a token easier

This commit is contained in:
Jan Böhmer 2023-10-02 00:45:21 +02:00
parent b796ae36db
commit 42356cc2a3
5 changed files with 1360 additions and 1344 deletions

View file

@ -182,5 +182,14 @@ class ApiToken
return $this;
}
/**
* Returns the last 4 characters of the token secret, which can be used to identify the token.
* @return string
*/
public function getLastTokenChars(): string
{
return substr($this->token, -4);
}
}