Files
autoglue/ui/src/sdk/docs/AuthApi.md
allanice001 56ea963b47 feat: add version info
Signed-off-by: allanice001 <allanice001@gmail.com>
2025-11-08 13:08:19 +00:00

6.9 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(provider)

Handle social login callback

Example

import {
  Configuration,
  AuthApi,
} from '@glueops/autoglue-sdk-go';
import type { AuthCallbackRequest } from '@glueops/autoglue-sdk-go';

async function example() {
  console.log("🚀 Testing @glueops/autoglue-sdk-go SDK...");
  const api = new AuthApi();

  const body = {
    // string | google|github
    provider: provider_example,
  } satisfies AuthCallbackRequest;

  try {
    const data = await api.authCallback(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);

Parameters

Name Type Description Notes
provider string google github

Return type

DtoTokenPair

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -

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

authStart

DtoAuthStartResponse authStart(provider)

Begin social login

Returns provider authorization URL for the frontend to redirect

Example

import {
  Configuration,
  AuthApi,
} from '@glueops/autoglue-sdk-go';
import type { AuthStartRequest } from '@glueops/autoglue-sdk-go';

async function example() {
  console.log("🚀 Testing @glueops/autoglue-sdk-go SDK...");
  const api = new AuthApi();

  const body = {
    // string | google|github
    provider: provider_example,
  } satisfies AuthStartRequest;

  try {
    const data = await api.authStart(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);

Parameters

Name Type Description Notes
provider string google github

Return type

DtoAuthStartResponse

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -

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

getJWKS

DtoJWKS getJWKS()

Get JWKS

Returns the JSON Web Key Set for token verification

Example

import {
  Configuration,
  AuthApi,
} from '@glueops/autoglue-sdk-go';
import type { GetJWKSRequest } from '@glueops/autoglue-sdk-go';

async function example() {
  console.log("🚀 Testing @glueops/autoglue-sdk-go SDK...");
  const api = new AuthApi();

  try {
    const data = await api.getJWKS();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);

Parameters

This endpoint does not need any parameter.

Return type

DtoJWKS

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -

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

logout

logout(body)

Revoke refresh token family (logout everywhere)

Example

import {
  Configuration,
  AuthApi,
} from '@glueops/autoglue-sdk-go';
import type { LogoutRequest } from '@glueops/autoglue-sdk-go';

async function example() {
  console.log("🚀 Testing @glueops/autoglue-sdk-go SDK...");
  const api = new AuthApi();

  const body = {
    // DtoLogoutRequest | Refresh token
    body: ...,
  } satisfies LogoutRequest;

  try {
    const data = await api.logout(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);

Parameters

Name Type Description Notes
body DtoLogoutRequest Refresh token

Return type

void (Empty response body)

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 No Content -

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

refresh

DtoTokenPair refresh(body)

Rotate refresh token

Example

import {
  Configuration,
  AuthApi,
} from '@glueops/autoglue-sdk-go';
import type { RefreshRequest } from '@glueops/autoglue-sdk-go';

async function example() {
  console.log("🚀 Testing @glueops/autoglue-sdk-go SDK...");
  const api = new AuthApi();

  const body = {
    // DtoRefreshRequest | Refresh token
    body: ...,
  } satisfies RefreshRequest;

  try {
    const data = await api.refresh(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);

Parameters

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

HTTP response details

Status code Description Response headers
200 OK -

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