mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-30 13:34:28 +02:00
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:
parent
b796ae36db
commit
42356cc2a3
5 changed files with 1360 additions and 1344 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue