Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClient ¶
GetClient returns an authenticated http.Client and the corresponding token. It's used by the server at startup. It requires a valid, pre-existing token.
func LoadToken ¶
LoadToken retrieves a token from a file, if it doesn't exist it returns a nil token.
func RevokeToken ¶
RevokeToken securely deletes the token file. It overwrites the file with zeros to prevent recovery of the sensitive token data, then closes the file, and finally removes it from the filesystem. This approach ensures that the file is properly handled for secure deletion, particularly on systems like Windows where a file must be closed before it can be removed.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.