mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
AuthN: Implement requester interface for identity (#75618)
* AuthN: Implement identity.Requester interface for authn.Identity * AuthN: Replace OrgRole with GetOrgRole * IDForwarding: skip converting to SignedInUser * Pass identity directly in permission sync hook
This commit is contained in:
@@ -80,9 +80,8 @@ func (s *Service) SignIdentity(ctx context.Context, id identity.Requester) (stri
|
||||
}
|
||||
|
||||
func (s *Service) hook(ctx context.Context, identity *authn.Identity, _ *authn.Request) error {
|
||||
// FIXME(kalleep): implement identity.Requester for authn.Identity
|
||||
// FIXME(kalleep): we should probably lazy load this
|
||||
token, err := s.SignIdentity(ctx, identity.SignedInUser())
|
||||
token, err := s.SignIdentity(ctx, identity)
|
||||
if err != nil {
|
||||
namespace, id := identity.NamespacedID()
|
||||
s.logger.Error("Failed to sign id token", "err", err, "namespace", namespace, "id", id)
|
||||
|
||||
Reference in New Issue
Block a user