Class: Infrawrench::AuthNamespace
- Inherits:
-
Object
- Object
- Infrawrench::AuthNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.auth
Instance Method Summary collapse
-
#initialize(transport) ⇒ AuthNamespace
constructor
private
A new instance of AuthNamespace.
-
#me(request_options: nil) ⇒ Hash
Current session + onboarding status.
-
#orgs(request_options: nil) ⇒ Array<Hash>
Organizations the current user belongs to.
Constructor Details
#initialize(transport) ⇒ AuthNamespace
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 AuthNamespace.
1498 1499 1500 |
# File 'lib/infrawrench/client.rb', line 1498 def initialize(transport) @transport = transport end |
Instance Method Details
#me(request_options: nil) ⇒ Hash
Current session + onboarding status
GET /api/auth/me
Raises on 401: Unauthenticated
1511 1512 1513 1514 1515 1516 1517 |
# File 'lib/infrawrench/client.rb', line 1511 def me(request_options: nil) @transport.request( http_method: "GET", path: "/api/auth/me", request_options: ) end |
#orgs(request_options: nil) ⇒ Array<Hash>
Organizations the current user belongs to
GET /api/auth/orgs
Raises on 401: Unauthenticated
1529 1530 1531 1532 1533 1534 1535 |
# File 'lib/infrawrench/client.rb', line 1529 def orgs(request_options: nil) @transport.request( http_method: "GET", path: "/api/auth/orgs", request_options: ) end |