Class: Infrawrench::AgentIdentityNamespace
- Inherits:
-
Object
- Object
- Infrawrench::AgentIdentityNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.agent.identity
Instance Method Summary collapse
-
#claim(request_options: nil) ⇒ Hash
Start the claim ceremony and mint a user code.
-
#create(body: nil, request_options: nil) ⇒ Hash
Open an anonymous registration and a 24-hour trial workspace.
-
#get(request_options: nil) ⇒ Hash
Poll this registration's claim status and time remaining.
-
#initialize(transport) ⇒ AgentIdentityNamespace
constructor
private
A new instance of AgentIdentityNamespace.
Constructor Details
#initialize(transport) ⇒ AgentIdentityNamespace
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of AgentIdentityNamespace.
936 937 938 |
# File 'lib/infrawrench/client.rb', line 936 def initialize(transport) @transport = transport end |
Instance Method Details
#claim(request_options: nil) ⇒ Hash
Start the claim ceremony and mint a user code
Returns a code to show the user together with the verification URL. Replaces any code already outstanding for this registration.
POST /api/agent/identity/claim
Raises on 400: Already claimed
Raises on 401: Unknown or revoked credential
Raises on 403: Registration revoked
956 957 958 959 960 961 962 |
# File 'lib/infrawrench/client.rb', line 956 def claim(request_options: nil) @transport.request( http_method: "POST", path: "/api/agent/identity/claim", request_options: ) end |
#create(body: nil, request_options: nil) ⇒ Hash
Open an anonymous registration and a 24-hour trial workspace
Requires no authentication — this is how a client with no credentials gets one. Rate limited per source address. The workspace it opens is deleted 24 hours later unless a person completes the claim ceremony.
POST /api/agent/identity
Raises on 429: Too many registrations from this address
Raises on 500: Could not open a workspace
980 981 982 983 984 985 986 987 |
# File 'lib/infrawrench/client.rb', line 980 def create(body: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/agent/identity", body: body, request_options: ) end |
#get(request_options: nil) ⇒ Hash
Poll this registration's claim status and time remaining
GET /api/agent/identity
Raises on 401: Unknown or revoked credential
Raises on 404: Unknown registration
1000 1001 1002 1003 1004 1005 1006 |
# File 'lib/infrawrench/client.rb', line 1000 def get(request_options: nil) @transport.request( http_method: "GET", path: "/api/agent/identity", request_options: ) end |