MCPcopy Create free account
hub / github.com/coder/coder / ParseGroupClaims

Method ParseGroupClaims

enterprise/coderd/enidpsync/groups.go:21–30  ·  view source on GitHub ↗

ParseGroupClaims parses the user claims and handles deployment wide group behavior. Almost all behavior is deferred since each organization configures it's own group sync settings. GroupAllowList is implemented here to prevent login by unauthorized users. TODO: GroupAllowList overlaps with the defau

(ctx context.Context, mergedClaims jwt.MapClaims)

Source from the content-addressed store, hash-verified

19// GroupAllowList is implemented here to prevent login by unauthorized users.
20// TODO: GroupAllowList overlaps with the default organization group sync settings.
21func (e EnterpriseIDPSync) ParseGroupClaims(ctx context.Context, mergedClaims jwt.MapClaims) (idpsync.GroupParams, *idpsync.HTTPError) {
22 resp, err := e.AGPLIDPSync.ParseGroupClaims(ctx, mergedClaims)
23 if err != nil {
24 return idpsync.GroupParams{}, err
25 }
26 return idpsync.GroupParams{
27 SyncEntitled: e.GroupSyncEntitled(),
28 MergedClaims: resp.MergedClaims,
29 }, nil
30}

Callers

nothing calls this directly

Calls 2

GroupSyncEntitledMethod · 0.95
ParseGroupClaimsMethod · 0.65

Tested by

no test coverage detected