Class: Anthropic::Models::Beta::Organization::Federation::BetaFederationRuleMatch

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/beta/organization/federation/beta_federation_rule_match.rb,
sig/anthropic/models/beta/organization/federation/beta_federation_rule_match.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(audience: nil, claims: nil, condition: nil, subject_prefix: nil) ⇒ Object

Does the incoming JWT qualify?

All populated fields must pass; omitted fields are skipped. At least one of subject_prefix (other than a wildcard-only value like *), claims, or condition is required; audience alone is not sufficient.

Some parameter documentations has been truncated, see Anthropic::Models::Beta::Organization::Federation::BetaFederationRuleMatch for more details.

Parameters:

  • audience (String, nil) (defaults to: nil)

    Exact match against the aud claim (any element if array). When omitted, the JW

  • claims (Hash{Symbol=>String}, nil) (defaults to: nil)

    Exact-match {claim: value} pairs against top-level claims. Only string-valued

  • condition (String, nil) (defaults to: nil)

    CEL expression over claims for logic the structural fields can't express. Must e

  • subject_prefix (String, nil) (defaults to: nil)

    Match the verified JWT sub claim. Exact match unless the value ends with *,



# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule_match.rb', line 40

Instance Attribute Details

#audienceString?

Exact match against the aud claim (any element if array). When omitted, the JWT's aud must still equal Anthropic's expected audience for the issuer; setting this field overrides that default.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


15
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule_match.rb', line 15

optional :audience, String, nil?: true

#claimsHash{Symbol=>String}?

Exact-match {claim: value} pairs against top-level claims. Only string-valued claims can be matched; use condition for non-string claims.

Parameters:

  • value (::Hash[Symbol, String], nil)

Returns:

  • (Hash{Symbol=>String}, nil)


22
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule_match.rb', line 22

optional :claims, Anthropic::Internal::Type::HashOf[String], nil?: true

#conditionString?

CEL expression over claims for logic the structural fields can't express. Must evaluate to a boolean and may reference only the claims variable; a constant-true expression (such as true) is rejected with 400.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


30
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule_match.rb', line 30

optional :condition, String, nil?: true

#subject_prefixString?

Match the verified JWT sub claim. Exact match unless the value ends with *, in which case it is a prefix match. Example: repo:my-org/my-repo:ref:refs/heads/main.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


38
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule_match.rb', line 38

optional :subject_prefix, String, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


30
# File 'sig/anthropic/models/beta/organization/federation/beta_federation_rule_match.rbs', line 30

def to_hash: -> {