oauth2x

package module
v0.0.0-...-c639706 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2021 License: MIT Imports: 5 Imported by: 0

README

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
}

Documentation

Directories

Path Synopsis
examples
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL