Skip to content

Latest commit

 

History

History
75 lines (46 loc) · 2 KB

File metadata and controls

75 lines (46 loc) · 2 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 and resource

GetUserAuthorizationFor

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

Is the current user authorized for the provided permission and resource

Example

package main

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

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

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.UserAuthorizationApi.GetUserAuthorizationFor(context.Background()).Permission(permission).ResourceName(resourceName).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
resourceName 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]