oauth

package
v0.50.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

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