Skip to main content

Go SDK

The official Authlete Go SDK provides a comprehensive client library for integrating OAuth 2.0 and OpenID Connect functionality into your Go applications.

Installation

go get github.com/authlete/authlete-go

Quick Start

package main

import (
    "github.com/authlete/authlete-go"
    "github.com/authlete/authlete-go/dto"
)

func main() ,
    \`}

    createdService, err := client.CreateService(service)
    if err != nil 
\`}

Features

  • Full OAuth 2.0 Support - All grant types and flows
  • OpenID Connect - Complete OIDC implementation
  • Go Idioms - Follows Go best practices
  • Context Support - Full context.Context integration
  • Comprehensive - All Authlete API endpoints covered

Documentation

Examples

Authorization Code Flow

// Process authorization request
authRequest := &dto.AuthorizationRequest,
\`}

response, err := client.ProcessAuthorizationRequest(authRequest)
if err != nil 

if response.Action == "INTERACTION" 
    
    result, err := client.IssueAuthorizationResponse(authResponse)
    if err != nil 
\`}

Token Management

// Process token request
tokenRequest := &dto.TokenRequest,
\`}

response, err := client.ProcessTokenRequest(tokenRequest)
if err != nil 

if response.Action == "OK" 

GitHub Repository

View on GitHub

Support

For questions and support: