(Auth)
- Introspect - Introspect
Introspect returns the current user's principle_id, user_id and a list of roles, permissions, and enabled features.
package main
import(
"github.com/conductorone/conductorone-sdk-go/pkg/models/shared"
conductoronesdkgo "github.com/conductorone/conductorone-sdk-go"
"context"
"log"
)
func main() {
s := conductoronesdkgo.New(
conductoronesdkgo.WithSecurity(shared.Security{
BearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
Oauth: "<YOUR_OAUTH_HERE>",
}),
)
ctx := context.Background()
res, err := s.Auth.Introspect(ctx)
if err != nil {
log.Fatal(err)
}
if res.IntrospectResponse != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.C1APIAuthV1AuthIntrospectResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |