Module: DIDKit::AtHandles Private
- Included in:
- Document, PLCOperation
- Defined in:
- lib/didkit/at_handles.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
-
#also_known_as ⇒ Array<String>
readonly
Returns a list of all identifiers assigned to this DID in its DID document through the
alsoKnownAsfield. -
#handles ⇒ Array<String>
readonly
Returns a list of ATProto handles assigned to this DID in its DID document.
Instance Attribute Details
#also_known_as ⇒ Array<String> (readonly)
Returns a list of all identifiers assigned to this DID in its DID document through the
alsoKnownAs field. This includes ATProto handles (in the format at://example.com) and
potentially other URIs like http URLs (e.g. for Bridgy accounts), and even (technically
invalid) non-URI strings. Use #handles to get just the ATProto handles.
36 37 38 |
# File 'lib/didkit/at_handles.rb', line 36 def also_known_as @also_known_as end |
#handles ⇒ Array<String> (readonly)
Returns a list of ATProto handles assigned to this DID in its DID document.
Note: the handles aren't guaranteed to be verified (validated in the other direction). Use DID#get_verified_handle to get a handle that is correctly verified.
According to the current ATProto DID spec, if a DID has more than one handle assigned, only the first one on the list should be considered and the rest should be ignored.
26 27 28 |
# File 'lib/didkit/at_handles.rb', line 26 def handles @handles end |