func (s *IdentityService) GetUserByOIDCIdentity(id services.OIDCIdentity) (services.User, error) {
	users, err := s.GetUsers()
	if err != nil {
		return nil, trace.Wrap(err)
	}
	for _, u := range users {
		for _, uid := range u.GetIdentities() {
			if uid.Equals(&id) {
				return u, nil
			}
		}
	}
	return nil, trace.NotFound("user with identity %v not found", &id)
}
// GetUserByOIDCIdentity returns a user by it's specified OIDC Identity, returns first
// user specified with this identity
GetUserByOIDCIdentity returns a user by it's specified OIDC Identity, returns first
user specified with this identity
// GetUserByOIDCIdentity returns a user by it ' s specified OIDC Identity returns first // user specified with this identity
func (s *IdentityService) GetUserByOIDCIdentity(id services.OIDCIdentity) (services.User, error) {
	users, err := s.GetUsers()
	if err != nil {
		return nil, trace.Wrap(err)
	}
	for _, u := range users {
		for _, uid := range u.GetIdentities() {
			if uid.Equals(&id) {
				return u, nil
			}
		}
	}
	return nil, trace.NotFound("user with identity %v not found", &id)
}
func ( s * IdentityService ) GetUserByOIDCIdentity ( id services . OIDCIdentity ) ( services . User , error ) { users , err := s . GetUsers ( ) if err != nil { return nil , trace . Wrap ( err ) } for _ , u := range users { for _ , uid := range u . GetIdentities ( ) { if uid . Equals ( & id ) { return u , nil } } } return nil , trace . NotFound ( " " , & id ) }
GetUserByOIDCIdentity returns a user by it's specified OIDC Identity, returns first
user specified with this identity
GetUserByOIDCIdentity returns a user by it ' s specified OIDC Identity returns first user specified with this identity