Documentation

Overview

    Package tokman implements an OAuth access token file manager.

    Index

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    This section is empty.

    Types

    type Renewer

    type Renewer struct {
    	// contains filtered or unexported fields
    }

      Renewer is used to renew an access token file.

      func Make

      func Make(a *auth.Authenticator, path string, lifetime time.Duration) (Renewer, error)

        Make makes an access token file and returns a Renewer for renewing the token.

        func (Renewer) KeepNew

        func (r Renewer) KeepNew(ctx context.Context)

          KeepNew keeps the access token valid until the context is canceled. This function blocks until canceled.

          func (Renewer) RenewOnce

          func (r Renewer) RenewOnce(lifetime time.Duration) (*oauth2.Token, error)

            RenewOnce renews the access token file once.

            Source Files