oauth2token.go 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. package http
  2. type OAuth2TokenResp struct {
  3. AccessToken string `json:"access_token"` // 授权令牌
  4. ExpiresIn int64 `json:"expires_in"` // 授权令牌的有效期
  5. RefreshToken string `json:"refresh_token"` // 刷新令牌
  6. TokenType string `json:"token_type"` // 令牌类型
  7. Scope string `json:"scope"` // 授权范围
  8. }
  9. type OAuth2AddUserReq struct {
  10. Data string `json:"data"`
  11. EventType string `json:"eventType"`
  12. }
  13. type OAuth2AddUser struct {
  14. Id string `json:"id"`
  15. Username string `json:"username"`
  16. Name string `json:"name"`
  17. UserId string `json:"userId"`
  18. PassWord string `json:"password"`
  19. Disabled bool `json:"disabled"`
  20. Pasture string `json:"pasture"`
  21. // OrganizationId string `json:"organizationId"`
  22. // OrganizationIds []string `json:"organizationIds"`
  23. // Disabled bool `json:"disabled"`
  24. // Number int `json:"number"`
  25. // Switch bool `json:"switch"`
  26. // Text string `json:"text"`
  27. // MultivaluedText []string `json:"multivaluedText"`
  28. }
  29. //type T struct {
  30. // Data string `json:"data"`
  31. // EventType string `json:"eventType"`
  32. // Nonce string `json:"nonce"`
  33. // Timestamp int64 `json:"timestamp"`
  34. //}