Documentation ¶
Index ¶
Constants ¶
View Source
const ( Token = 1 Code = 2 )
Restore the authorize type
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authorize ¶
type Authorize struct {
// contains filtered or unexported fields
}
Authorize struct defines the basic parameter which needed in authorize url.
func NewAuthorize ¶
NewAuthorize function builds a new authorize object.
func (*Authorize) Authorize ¶
Authorize function make a request to the authorize url, according to the parameters in the Authorize struct. The function not only can authorize token type request, but also code one. If the responseType is "code", the parameter user can be nil. The code authorize use session to authorize.
func (*Authorize) AuthorizeApp ¶
AuthorizeApp function authorize a specific APP. The usage can infer the example. checkFunc parameter is used to whether the specific app is authorized. The parameter can be nil.
Click to show internal directories.
Click to hide internal directories.