Skip to content

Commit 40458ac

Browse files
Merge pull request #19 from xconnio/authenticate-with-realm
update authentication apis call
2 parents 2c45e2b + 57955ba commit 40458ac

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

cmd/deskconn-router/main.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func (a *Authenticator) Methods() []auth.Method {
4949
func (a *Authenticator) Authenticate(request auth.Request) (auth.Response, error) {
5050
switch request.AuthMethod() {
5151
case auth.MethodCRA:
52-
callResp := a.session.Call(procedureCRAVerify).Arg(request.AuthID()).Do()
52+
callResp := a.session.Call(procedureCRAVerify).Args(request.AuthID(), request.Realm()).Do()
5353
if callResp.Err != nil {
5454
return nil, callResp.Err
5555
}
@@ -91,7 +91,8 @@ func (a *Authenticator) Authenticate(request auth.Request) (auth.Response, error
9191
return auth.NewResponse(cryptosignRequest.AuthID(), webAppAuthRole, 0)
9292
}
9393

94-
callResp := a.session.Call(procedureCryptosignVerify).Args(request.AuthID(), cryptosignRequest.PublicKey()).Do()
94+
callResp := a.session.Call(procedureCryptosignVerify).Args(request.AuthID(), cryptosignRequest.PublicKey(),
95+
request.Realm()).Do()
9596
if callResp.Err != nil {
9697
return nil, callResp.Err
9798
}

0 commit comments

Comments
 (0)