Skip to content
Snippets Groups Projects
Commit c7350ab6 authored by Niall Sheridan's avatar Niall Sheridan
Browse files

Be explicit that this is for signing user keys

parent 8a452cd5
No related branches found
No related tags found
No related merge requests found
...@@ -99,7 +99,7 @@ func signHandler(a *appContext, w http.ResponseWriter, r *http.Request) (int, er ...@@ -99,7 +99,7 @@ func signHandler(a *appContext, w http.ResponseWriter, r *http.Request) (int, er
if err != nil { if err != nil {
return http.StatusInternalServerError, err return http.StatusInternalServerError, err
} }
signed, err := a.sshKeySigner.Sign(req) signed, err := a.sshKeySigner.SignUserKey(req)
a.authprovider.Revoke(token) a.authprovider.Revoke(token)
if err != nil { if err != nil {
return http.StatusInternalServerError, err return http.StatusInternalServerError, err
......
...@@ -18,7 +18,7 @@ type KeySigner struct { ...@@ -18,7 +18,7 @@ type KeySigner struct {
permissions map[string]string permissions map[string]string
} }
func (s *KeySigner) Sign(req *lib.SignRequest) (string, error) { func (s *KeySigner) SignUserKey(req *lib.SignRequest) (string, error) {
pubkey, _, _, _, err := ssh.ParseAuthorizedKey([]byte(req.Key)) pubkey, _, _, _, err := ssh.ParseAuthorizedKey([]byte(req.Key))
if err != nil { if err != nil {
return "", err return "", err
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment