init from gitlab

This commit is contained in:
texm
2023-04-25 14:33:14 +08:00
parent 6a85a41ff0
commit c8202a5c82
281 changed files with 19861 additions and 1 deletions

View File

@@ -0,0 +1,16 @@
package auth
type GithubAuthenticator struct {
baseAuthenticator
}
func NewGithubAuthenticator(cfg Config) (*GithubAuthenticator, error) {
ghAuth := &GithubAuthenticator{}
// TODO: check these
ghAuth.signingKey = cfg.SigningKey
ghAuth.tokenLifetime = cfg.TokenLifetime
ghAuth.cookieDomain = cfg.CookieDomain
ghAuth.authMethod = MethodGithub
return ghAuth, nil
}