oauth

package
v0.56.5 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: Apache-2.0 Imports: 9 Imported by: 1 module, 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OAuthServer

type OAuthServer struct {
	// contains filtered or unexported fields
}

OAuthServer provides server logic to use OAuth token of the user. !!VERY IMPORTANT; PLEASE READ!!: KHI is not expected to be shared by multiple users because it's designed as just a log visualizer used in local environment of each engineers.

After authenticating an user with OAuth, then the other accessing the same KHI process gain the same access of the first user authenticated.

func NewOAuthServer

func NewOAuthServer(engine *gin.Engine, oauthConfig *oauth2.Config, oauthRedirectTargetServingPath string, oauthStateCodeSuffix string) *OAuthServer

NewOAuthServer creates and initializes a new OAuthServer.

func (*OAuthServer) TokenSource

func (s *OAuthServer) TokenSource() oauth2.TokenSource

TokenSource returns an oauth2.TokenSource that can be used to retrieve OAuth2 tokens from this server. This is the primary method for external components to obtain tokens managed by this OAuthServer.

Jump to

Keyboard shortcuts

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