mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-10 15:47:36 +02:00
directory: remove provider from user id (#2068)
This commit is contained in:
parent
a51c7140ea
commit
aeb8aaf9cd
18 changed files with 71 additions and 104 deletions
|
@ -7,8 +7,6 @@ import (
|
|||
"time"
|
||||
|
||||
"gopkg.in/square/go-jose.v2/jwt"
|
||||
|
||||
"github.com/pomerium/pomerium/pkg/grpc/databroker"
|
||||
)
|
||||
|
||||
// ErrMissingID is the error for a session state that has no ID set.
|
||||
|
@ -86,9 +84,9 @@ func (s *State) IsExpired() bool {
|
|||
// UserID returns the corresponding user ID for a session.
|
||||
func (s *State) UserID(provider string) string {
|
||||
if s.OID != "" {
|
||||
return databroker.GetUserID(provider, s.OID)
|
||||
return s.OID
|
||||
}
|
||||
return databroker.GetUserID(provider, s.Subject)
|
||||
return s.Subject
|
||||
}
|
||||
|
||||
// UnmarshalJSON returns a State struct from JSON. Additionally munges
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue