identityprovider

package
v2.10.2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authorize

func Authorize(db database.Store, accessURL *url.URL) http.HandlerFunc

Authorize displays an HTML page for authorizing an application when the user has first been redirected to this path and generates a code and redirects to the app's callback URL after the user clicks "allow" on that page, which is detected via the origin and referer headers.

func RevokeApp

func RevokeApp(db database.Store) http.HandlerFunc

func Tokens

func Tokens(db database.Store, defaultLifetime time.Duration) http.HandlerFunc

Types

type OAuth2ProviderAppSecret

type OAuth2ProviderAppSecret struct {
	// Formatted contains the secret. This value is owned by the client, not the
	// server.  It is formatted to include the prefix.
	Formatted string
	// Prefix is the ID of this secret owned by the server. When a client uses a
	// secret, this is the matching string to do a lookup on the hashed value.  We
	// cannot use the hashed value directly because the server does not store the
	// salt.
	Prefix string
	// Hashed is the server stored hash(secret,salt,...). Used for verifying a
	// secret.
	Hashed string
}

func GenerateSecret

func GenerateSecret() (OAuth2ProviderAppSecret, error)

GenerateSecret generates a secret to be used as a client secret, refresh token, or authorization code.

Jump to

Keyboard shortcuts

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