client

package
v1.22.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package client is an OAuth client as the authorization server knows it: what it is called and where it may be sent back to.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsLoopback

func IsLoopback(u *url.URL) bool

IsLoopback says whether the URL is an http URL on a loopback address, which an app on the user's own machine receives its response at. The IPv6 loopback is not one: a Content-Security-Policy can name no IPv6 address, so the consent page's form could not be let send the user on to it.

Types

type Client

type Client struct {
	Id   string
	Name string
	// RedirectUris are where an authorization response may go, matched exactly but for the port of
	// a loopback address (RFC 8252 section 7.3): an app on the user's own machine listens on
	// whatever port it is given.
	RedirectUris []string
	// SelfRegistered is a client that registered itself (RFC 7591): its name is what it called
	// itself, which nothing checks, and its id says nothing of who it is.
	SelfRegistered bool
}

func (*Client) AllowsRedirectUri

func (c *Client) AllowsRedirectUri(uri string) bool

AllowsRedirectUri says whether the client may be sent back to the URI.

Jump to

Keyboard shortcuts

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