Skip to content
Snippets Groups Projects
Commit de238d0f authored by Ophestra's avatar Ophestra
Browse files

allow clearing secret in client

parent 436ac328
No related branches found
No related tags found
No related merge requests found
......@@ -52,6 +52,12 @@ func (r *Remote) Handshake() error {
// Secret authenticates and sets secret.
func (r *Remote) Secret(secret string) (api.UserPayload, bool) {
// Clear secret if empty
if secret == "" {
r.secret = secret
return api.UserPayload{}, true
}
prev := r.secret
r.secret = secret
if user, err := r.This(); err != nil {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment