authutil

package
v1.9.0-pre.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0, CC-BY-4.0, MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Copyright 2026 The Go MCP SDK Authors. All rights reserved. Use of this source code is governed by the license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPKCESupport

func CheckPKCESupport(methods []string, issuer string) error

CheckPKCESupport returns an error unless methods, the code_challenge_methods_supported of the authorization server at issuer, includes S256, the PKCE method that the SDK's authorization code flows use. The MCP authorization spec requires a client to refuse an authorization server that does not advertise PKCE before starting such a flow.

func IssuersEqual

func IssuersEqual(a, b string) bool

IssuersEqual reports whether two OAuth 2.0 authorization server issuer identifiers refer to the same server comparing them without the final trailing slash.

func ScopesFromToken

func ScopesFromToken(token *oauth2.Token) []string

ScopesFromToken extracts the granted scopes from an OAuth2 token response. Per RFC 6749 §5.1, the scope parameter is optional; returns nil if absent. An empty scope names no scope-token, so it is treated as absent too: callers take nil to mean the requested scopes were granted.

func UnionScopes

func UnionScopes(existing, challenged []string) []string

UnionScopes returns the union of the existing and challenged scope sets. It is used during step-up authorization to accumulate scopes across authorization rounds (SEP-2350).

Types

This section is empty.

Jump to

Keyboard shortcuts

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