Skip to content

Latest commit

 

History

History
73 lines (44 loc) · 1.82 KB

File metadata and controls

73 lines (44 loc) · 1.82 KB

\UserAuthorizationApi

All URIs are relative to http://localhost

Method HTTP request Description
GetUserAuthorizationFor Get /user/authorization/for Is the current user authorized for the provided permission

GetUserAuthorizationFor

GetUserAuthorizationFor(ctx).Permission(permission).Execute()

Is the current user authorized for the provided permission

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    permission := "permission_example" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.UserAuthorizationApi.GetUserAuthorizationFor(context.Background()).Permission(permission).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `UserAuthorizationApi.GetUserAuthorizationFor``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiGetUserAuthorizationForRequest struct via the builder pattern

Name Type Description Notes
permission string

Return type

(empty response body)

Authorization

ApiToken, ServiceBearer, ServiceToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]