Skip to content

Commit

Permalink
Add debug output
Browse files Browse the repository at this point in the history
Print the IsAuthenticated result for debugging.
  • Loading branch information
adombeck committed Jan 24, 2025
1 parent 173ec8c commit c4a0337
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/dbusservice/methods.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package dbusservice

import (
"context"

"github.com/godbus/dbus/v5"
"github.com/ubuntu/authd/log"
)

// NewSession is the method through which the broker and the daemon will communicate once dbusInterface.NewSession is called.
Expand Down Expand Up @@ -35,8 +38,10 @@ func (s *Service) SelectAuthenticationMode(sessionID, authenticationModeName str
func (s *Service) IsAuthenticated(sessionID, authenticationData string) (access, data string, dbusErr *dbus.Error) {
access, data, err := s.broker.IsAuthenticated(sessionID, authenticationData)
if err != nil {
log.Errorf(context.Background(), "IsAuthenticated error: %v", err)
return "", "", dbus.MakeFailedError(err)
}
log.Debugf(context.Background(), "IsAuthenticated: %s", access)
return access, data, nil
}

Expand Down

0 comments on commit c4a0337

Please sign in to comment.