Files
autoglue/sdk/go/docs/AuthAPI.md
allanice001 334df457ce feat: complete node pool api, sdk and ui
Signed-off-by: allanice001 <allanice001@gmail.com>
2025-11-08 10:22:45 +00:00

7.7 KiB

\AuthAPI

All URIs are relative to /api/v1

Method HTTP request Description
AuthCallback Get /auth/{provider}/callback Handle social login callback
AuthStart Post /auth/{provider}/start Begin social login
GetJWKS Get /.well-known/jwks.json Get JWKS
Logout Post /auth/logout Revoke refresh token family (logout everywhere)
Refresh Post /auth/refresh Rotate refresh token

AuthCallback

DtoTokenPair AuthCallback(ctx, provider).Execute()

Handle social login callback

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/glueops/autoglue-sdk-go"
)

func main() {
	provider := "provider_example" // string | google|github

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.AuthAPI.AuthCallback(context.Background(), provider).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AuthAPI.AuthCallback``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `AuthCallback`: DtoTokenPair
	fmt.Fprintf(os.Stdout, "Response from `AuthAPI.AuthCallback`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
provider string google github

Other Parameters

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

Name Type Description Notes

Return type

DtoTokenPair

Authorization

No authorization required

HTTP request headers

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

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

AuthStart

DtoAuthStartResponse AuthStart(ctx, provider).Execute()

Begin social login

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/glueops/autoglue-sdk-go"
)

func main() {
	provider := "provider_example" // string | google|github

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.AuthAPI.AuthStart(context.Background(), provider).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AuthAPI.AuthStart``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `AuthStart`: DtoAuthStartResponse
	fmt.Fprintf(os.Stdout, "Response from `AuthAPI.AuthStart`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
provider string google github

Other Parameters

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

Name Type Description Notes

Return type

DtoAuthStartResponse

Authorization

No authorization required

HTTP request headers

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

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

GetJWKS

DtoJWKS GetJWKS(ctx).Execute()

Get JWKS

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/glueops/autoglue-sdk-go"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.AuthAPI.GetJWKS(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AuthAPI.GetJWKS``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetJWKS`: DtoJWKS
	fmt.Fprintf(os.Stdout, "Response from `AuthAPI.GetJWKS`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

DtoJWKS

Authorization

No authorization required

HTTP request headers

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

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

Logout

Logout(ctx).Body(body).Execute()

Revoke refresh token family (logout everywhere)

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/glueops/autoglue-sdk-go"
)

func main() {
	body := *openapiclient.NewDtoLogoutRequest() // DtoLogoutRequest | Refresh token

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.AuthAPI.Logout(context.Background()).Body(body).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AuthAPI.Logout``: %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 apiLogoutRequest struct via the builder pattern

Name Type Description Notes
body DtoLogoutRequest Refresh token

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

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

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

Refresh

DtoTokenPair Refresh(ctx).Body(body).Execute()

Rotate refresh token

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/glueops/autoglue-sdk-go"
)

func main() {
	body := *openapiclient.NewDtoRefreshRequest() // DtoRefreshRequest | Refresh token

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.AuthAPI.Refresh(context.Background()).Body(body).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AuthAPI.Refresh``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `Refresh`: DtoTokenPair
	fmt.Fprintf(os.Stdout, "Response from `AuthAPI.Refresh`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
body DtoRefreshRequest Refresh token

Return type

DtoTokenPair

Authorization

No authorization required

HTTP request headers

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

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