Documentation ¶
Index ¶
- Constants
- type Provider
- func (p *Provider) CheckOrgs(ctx context.Context, tokens *oidc.Tokens[*idtoken.Claims]) error
- func (p *Provider) CheckTeams(ctx context.Context, tokens *oidc.Tokens[*idtoken.Claims]) error
- func (p *Provider) CheckUser(ctx context.Context, _ state.State, _ types.UserData, ...) error
- func (p *Provider) GetDefaultScopes() []string
- func (p *Provider) GetEndpoints(conf config.Config) (oauth2.Endpoint, error)
- func (p *Provider) GetName() string
- func (p *Provider) GetRefreshToken(tokens *oidc.Tokens[*idtoken.Claims]) string
- func (p *Provider) GetUser(ctx context.Context, tokens *oidc.Tokens[*idtoken.Claims]) (types.UserData, error)
- func (p *Provider) Refresh(ctx context.Context, _ *slog.Logger, accessToken string, _ rp.RelyingParty) (string, error)
Constants ¶
View Source
const Name = "github"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
func NewProvider ¶
func (*Provider) CheckTeams ¶ added in v1.7.0
func (*Provider) GetDefaultScopes ¶ added in v1.11.0
func (*Provider) GetEndpoints ¶ added in v1.6.0
func (*Provider) GetRefreshToken ¶ added in v1.13.0
GetRefreshToken returns the oauth2.Token.AccessToken of the user, since it does not expire. OAuth2 App on GitHub doesn't provide a refresh token.
func (*Provider) Refresh ¶ added in v1.13.0
func (p *Provider) Refresh(ctx context.Context, _ *slog.Logger, accessToken string, _ rp.RelyingParty) (string, error)
Refresh use the oauth2.Token.AccessToken from initial authentication and call the REST API if the user is still present inside the required groups.
Click to show internal directories.
Click to hide internal directories.