oauthparams

package
v0.51.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package oauthparams provides shared definitions for reserved OAuth2 authorization parameters that are managed by the framework.

Index

Constants

This section is empty.

Variables

View Source
var ReservedAuthorizationParams = map[string]bool{
	"response_type":         true,
	"client_id":             true,
	"redirect_uri":          true,
	"scope":                 true,
	"state":                 true,
	"code_challenge":        true,
	"code_challenge_method": true,
	"nonce":                 true,
}

ReservedAuthorizationParams are OAuth2 parameters managed by the framework that must not be set via AdditionalAuthorizationParams.

View Source
var ReservedTokenParams = map[string]bool{
	"grant_type":            true,
	"code":                  true,
	"redirect_uri":          true,
	"client_id":             true,
	"client_secret":         true,
	"code_verifier":         true,
	"refresh_token":         true,
	"scope":                 true,
	"client_assertion":      true,
	"client_assertion_type": true,
}

ReservedTokenParams are OAuth2 parameters managed by the framework that must not be set via AdditionalTokenParams. They cover both token-endpoint grant types the framework issues (authorization_code and refresh_token), plus the RFC 7523 client-authentication credentials: letting those through would combine an assertion with the configured client_secret or HTTP Basic credentials into an invalid multi-method client-auth request, and would put a credential in plain configuration instead of a secret-backed path.

Functions

func Validate

func Validate(params map[string]string) error

Validate checks that no key in params is a reserved OAuth2 authorization parameter. Reserved parameters are managed by the framework and cannot be overridden via additional authorization params.

func ValidateTokenParams added in v0.50.0

func ValidateTokenParams(params map[string]string) error

ValidateTokenParams checks that no key in params is a reserved OAuth2 token-request parameter. Reserved parameters are managed by the framework and cannot be overridden via additional token params. A "resource" entry is additionally checked against the RFC 8707 shape.

Types

This section is empty.

Jump to

Keyboard shortcuts

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