code: func (o *OIDCConnectorV2) MapClaims(claims jose.Claims) []string {
  	var roles []string
  	for _, mapping := range o.Spec.ClaimsToRoles {
  		for claimName := range claims {
  			if claimName != mapping.Claim {
  				continue
  			}
  			var claimValues []string
  			claimValue, ok, _ := claims.StringClaim(claimName)
  			if ok {
  				claimValues = []string{claimValue}
  			} else {
  				claimValues, _, _ = claims.StringsClaim(claimName)
  			}
  		claimLoop:
  			for _, claimValue := range claimValues {
  				for _, role := range mapping.Roles {
  					outRole, err := utils.ReplaceRegexp(mapping.Value, role, claimValue)
  					switch {
  					case err != nil:
  						if trace.IsNotFound(err) {
  							log.Debugf("Failed to match expression %v, replace with: %v input: %v, err: %v", mapping.Value, role, claimValue, err)
  						}
  						// this claim value clearly did not match, move on to another
  						continue claimLoop
  						// skip empty replacement or empty role
  					case outRole == "":
  					case outRole != "":
  						roles = append(roles, outRole)
  					}
  				}
  			}
  		}
  	}
  	return utils.Deduplicate(roles)
  }
docs: // MapClaims maps claims to roles