/go-oauth2x

Extension of the OAuth2 library for Go

Primary LanguageGoMIT LicenseMIT

Extension of the OAuth2 library for Go

A library extends OAuth2 for Go.

  • Asynchronous preloading of a token

Installation

go get github.com/rxnew/go-oauth2x

Examples

package main

import (
	"context"

	"github.com/rxnew/go-oauth2x"
	"golang.org/x/oauth2"
)

func main() {
	c := &oauth2.Config{ /* Configure */ }
	ctx := context.Background()
	cli := oauth2x.NewClient(ctx, c.TokenSource(ctx, nil))
	resp, err := cli.Get("https://example.com")
	// Process the response
}