mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-19 11:33:01 -06:00
further oidc
This commit is contained in:
parent
8e0d32d3e1
commit
81206d93f3
14 changed files with 227 additions and 70 deletions
|
|
@ -31,13 +31,11 @@ import (
|
|||
const (
|
||||
// CallbackPath is the API path for receiving callback tokens from external OIDC providers
|
||||
CallbackPath = "/auth/callback"
|
||||
profileScope = "profile"
|
||||
emailScope = "email"
|
||||
groupsScope = "groups"
|
||||
)
|
||||
|
||||
type IDP interface {
|
||||
HandleCallback(ctx context.Context, state string, code string) (*Claims, error)
|
||||
HandleCallback(ctx context.Context, code string) (*Claims, error)
|
||||
AuthCodeURL(state string) string
|
||||
}
|
||||
|
||||
type idp struct {
|
||||
|
|
@ -55,9 +53,6 @@ func NewIDP(config *config.Config, log *logrus.Logger) (IDP, error) {
|
|||
}
|
||||
|
||||
// validate config fields
|
||||
if config.OIDCConfig.IDPID == "" {
|
||||
return nil, fmt.Errorf("not set: IDPID")
|
||||
}
|
||||
if config.OIDCConfig.IDPName == "" {
|
||||
return nil, fmt.Errorf("not set: IDPName")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue