pkgsite: Index | Files

package auth

import ""

Package auth authorizes programs to make HTTP requests to the discovery site.


Package Files


func Header(ctx context.Context, jsonCreds []byte, useExp bool) (_ string, err error)

Header returns a header value (typically a Bearer token) to be used in the HTTP 'Authorization' header.

func NewClient Uses

func NewClient(ctx context.Context, jsonCreds []byte, useExp bool) (_ *http.Client, err error)

NewClient creates an http.Client for accessing go-discovery services. Its first argument is the JSON contents of a service account credentials file. If nil, default credentials are used. Its second argument determines which client ID to use.

Package auth imports 5 packages (graph) and is imported by 2 packages. Updated 2021-01-16. Refresh now. Tools for package owners.