revocation

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2020 License: MIT Imports: 2 Imported by: 1

Documentation

Overview

Package revocation provides structures and functions to implement the additional OAuth2 Token Revocation specification.

Index

Constants

View Source
const (
	AccessToken  = "access_token"
	RefreshToken = "refresh_token"
)

The known OAuth2 token types.

Variables

This section is empty.

Functions

func KnownTokenType

func KnownTokenType(str string) bool

KnownTokenType returns true if the token type is a known token type (e.g. access token or refresh token).

func UnsupportedTokenType

func UnsupportedTokenType(description string) *oauth2.Error

UnsupportedTokenType constructs an error that indicates that the authorization server does not support the revocation of the presented token type.

Types

type Request

type Request struct {
	Token         string
	TokenTypeHint string
	ClientID      string
	ClientSecret  string

	HTTP *http.Request
}

A Request is typically returned by ParseRequest and holds all information necessary to handle a revocation request.

func ParseRequest

func ParseRequest(r *http.Request) (*Request, error)

ParseRequest parses an incoming request and returns a Request. The functions validates basic constraints given by the OAuth2 spec.

Jump to

Keyboard shortcuts

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