Class: Cadenya::Models::SubjectAssertion

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/cadenya/models/subject_assertion.rb,
sig/cadenya/models/subject_assertion.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(id:, name: nil) ⇒ SubjectAssertion

Some parameter documentations has been truncated, see Cadenya::Models::SubjectAssertion for more details.

SubjectAssertion identifies a person within a tenant in the customer's own namespace — typically their user id. Asserting a subject upserts the subject record under the asserted tenant and associates the created resource with it. A subject assertion is only valid alongside a tenant assertion: subject identifiers are scoped to their tenant.

Parameters:

  • id (String)

    The subject identifier in the customer's namespace (e.g. their user id).

  • name (String) (defaults to: nil)

    Optional human-readable name for the subject. Updates the subject

  • id: (String)
  • name: (String) (defaults to: nil)


# File 'lib/cadenya/models/subject_assertion.rb', line 20

Instance Attribute Details

#idString

The subject identifier in the customer's namespace (e.g. their user id). Stored as the subject record's external_id; unique within the tenant.

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/cadenya/models/subject_assertion.rb', line 11

required :id, String

#nameString?

Optional human-readable name for the subject. Updates the subject record's name on every assertion that provides it.

Parameters:

  • (String)

Returns:

  • (String, nil)


18
# File 'lib/cadenya/models/subject_assertion.rb', line 18

optional :name, String

Instance Method Details

#to_hash{ id: String, name: String }

Returns:

  • ({ id: String, name: String })


14
# File 'sig/cadenya/models/subject_assertion.rbs', line 14

def to_hash: -> { id: String, name: String }