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.