diff options
| author | Niall Sheridan <nsheridan@gmail.com> | 2016-09-01 22:28:12 +0100 | 
|---|---|---|
| committer | Niall Sheridan <nsheridan@gmail.com> | 2016-09-01 22:28:12 +0100 | 
| commit | dba3de4451f29fc0b8cb6474b9bbb18ed61d9eac (patch) | |
| tree | a7735c443b922735821f1e8af141f46dbb68f1ff /cmd | |
| parent | 9c58d4d6a324ed8422ef691471868d760b64f7bd (diff) | |
Remove the Principal field from the request
The server will always overwrite this field with the username obtained from
the auth provider. Allowing the client to set it is a waste of time.
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/cashierd/main.go | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/cashierd/main.go b/cmd/cashierd/main.go index e3aec93..e71c126 100644 --- a/cmd/cashierd/main.go +++ b/cmd/cashierd/main.go @@ -159,9 +159,9 @@ func signHandler(a *appContext, w http.ResponseWriter, r *http.Request) (int, er  	if err != nil {  		return http.StatusInternalServerError, err  	} -	req.Principal = a.authprovider.Username(token) +	username := a.authprovider.Username(token)  	a.authprovider.Revoke(token) // We don't need this anymore. -	cert, err := a.sshKeySigner.SignUserKey(req) +	cert, err := a.sshKeySigner.SignUserKey(req, username)  	if err != nil {  		return http.StatusInternalServerError, err  	}  | 
