MCPcopy Index your code
hub / github.com/golang/oauth2

github.com/golang/oauth2 @v0.36.0 sqlite

repository ↗ · DeepWiki ↗ · release v0.36.0 ↗
512 symbols 1,934 edges 93 files 156 documented · 30% 216 cross-repo links
README

OAuth2 for Go

Go Reference Build Status

oauth2 package contains a client implementation for OAuth 2.0 spec.

See pkg.go.dev for further documentation and examples.

Policy for new endpoints

We no longer accept new provider-specific packages in this repo if all they do is add a single endpoint variable. If you just want to add a single endpoint, add it to the pkg.go.dev/golang.org/x/oauth2/endpoints package.

Report Issues / Send Patches

The main issue tracker for the oauth2 repository is located at https://github.com/golang/oauth2/issues.

This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://go.dev/doc/contribute.

The git repository is https://go.googlesource.com/oauth2.

Note:

  • Excluding trivial changes, all contributions should be connected to an existing issue.
  • API changes must go through the change proposal process before they can be accepted.
  • The code owners are listed at dev.golang.org/owners.

Extension points exported contracts — how you extend this code

TokenSource (Interface)
A TokenSource is anything that can return a token. [16 implementers]
oauth2.go
SubjectTokenSupplier (Interface)
SubjectTokenSupplier can be used to supply a subject token to exchange for a GCP access token. [1 implementers]
google/externalaccount/basecredentials.go
Signer (FuncType)
Signer returns a signature for the given data.
jws/jws.go
AuthorizationHandler (FuncType)
AuthorizationHandler is a 3-legged-OAuth helper that prompts the user for OAuth consent at the specified auth code URL a
authhandler/authhandler.go
AuthCodeOption (Interface)
An AuthCodeOption is passed to Config.AuthCodeURL. [2 implementers]
oauth2.go
AwsSecurityCredentialsSupplier (Interface)
AWSSecurityCredentialsSupplier can be used to supply AwsSecurityCredentials and an AWS Region to exchange for a GCP acce [1 …
google/externalaccount/basecredentials.go

Core symbols most depended-on inside this repo

Get
called by 80
internal/token.go
parse
called by 42
google/externalaccount/basecredentials.go
subjectToken
called by 38
google/externalaccount/basecredentials.go
Token
called by 30
oauth2.go
Error
called by 21
google/externalaccount/executablecredsource.go
UniverseDomain
called by 20
google/default.go
missingFieldError
called by 19
google/externalaccount/executablecredsource.go
Error
called by 18
token.go

Shape

Function 288
Method 124
Struct 86
Interface 6
TypeAlias 5
FuncType 3

Languages

Go100%

Modules by API surface

google/externalaccount/aws_test.go59 symbols
google/externalaccount/executablecredsource.go33 symbols
google/externalaccount/aws.go27 symbols
oauth2.go26 symbols
oauth2_test.go24 symbols
google/externalaccount/basecredentials.go21 symbols
internal/token.go18 symbols
google/externalaccount/executablecredsource_test.go17 symbols
google/default.go16 symbols
google/externalaccount/basecredentials_test.go15 symbols
transport_test.go11 symbols
token.go11 symbols

Dependencies from manifests, versioned

cloud.google.com/go/compute/metadatav0.3.0 · 1×

For agents

$ claude mcp add oauth2 \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact