Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { ID uint `json:"id,omitempty"` Name string `json:"name"` Code string `json:"code,omitempty"` Secret string `json:"secret,omitempty"` RedirectURI string `json:"redirect_uri" db:"redirect_uri"` UserData interface{} `json:"-" db:"userdata"` CreatedAt time.Time `json:"created,omitempty" db:"created"` AllowedGrantTypes StringSlice `json:"grant_types,omitempty" db:"grant_types" ` AllowedResponseTypes StringSlice `json:"response_types,omitempty" db:"response_types"` AllowedScopes StringSlice `json:"scopes,omitempty" db:"scopes"` }
Client of oauth2 app
func (*Client) GetRedirectUri ¶
GetRedirectUri osin.Client.GetRedirectUri
func (*Client) GetUserData ¶
func (c *Client) GetUserData() interface{}
GetUserData osin.Client.GetUserData
type ClientSpec ¶ added in v0.9.0
type ClientSpec struct { Page int `json:"page,omitempty" form:"page"` Limit int `json:"limit,omitempty" form:"limit"` Orders []string `json:"order,omitempty" form:"order"` Total int `json:"total,omitempty"` // for set value CountOnly bool `json:"count,omitempty" form:"count"` }
ClientSpec 查询参数
type OSINStore ¶ added in v0.9.0
type OSINStore interface { osin.Storage LoadClients(spec *ClientSpec) ([]Client, error) CountClients() uint GetClientWithCode(code string) (*Client, error) GetClientWithID(id int) (*Client, error) SaveClient(client *Client) error LoadScopes() (scopes []Scope, err error) IsAuthorized(clientID, username string) bool SaveAuthorized(clientID, username string) error }
type StringSlice ¶ added in v0.9.0
type StringSlice = types.StringSlice
Click to show internal directories.
Click to hide internal directories.