oauth.go 530 B

1234567891011121314151617181920212223242526
  1. package model
  2. type Oauth struct {
  3. IdModel
  4. Op string `json:"op"`
  5. ClientId string `json:"client_id"`
  6. ClientSecret string `json:"client_secret"`
  7. RedirectUrl string `json:"redirect_url"`
  8. AutoRegister *bool `json:"auto_register"`
  9. Scopes string `json:"scopes"`
  10. Issuer string `json:"issuer"`
  11. TimeModel
  12. }
  13. const (
  14. OauthTypeGithub = "github"
  15. OauthTypeGoogle = "google"
  16. OauthTypeOidc = "oidc"
  17. OauthTypeWebauth = "webauth"
  18. )
  19. type OauthList struct {
  20. Oauths []*Oauth `json:"list"`
  21. Pagination
  22. }