@@ -4,44 +4,44 @@ import (
44 "time"
55)
66
7- // TokenGenerateRequest Provide to generate the token request parameters
7+ // TokenGenerateRequest provide to generate the token request parameters
88type TokenGenerateRequest struct {
9- ClientID string // The client information
10- ClientSecret string // The client secret
11- UserID string // The user id
12- RedirectURI string // Redirect URI
13- Scope string // Scope of authorization
14- Code string // Authorization code
15- Refresh string // Refreshing token
16- AccessTokenExp time.Duration // Access token expiration time (in seconds)
9+ ClientID string
10+ ClientSecret string
11+ UserID string
12+ RedirectURI string
13+ Scope string
14+ Code string
15+ Refresh string
16+ AccessTokenExp time.Duration
1717}
1818
19- // Manager Authorization management interface
19+ // Manager authorization management interface
2020type Manager interface {
21- // Check the interface implementation
21+ // check the interface implementation
2222 CheckInterface () (err error )
2323
24- // Get the client information
24+ // get the client information
2525 GetClient (clientID string ) (cli ClientInfo , err error )
2626
27- // Generate the authorization token(code)
27+ // generate the authorization token(code)
2828 GenerateAuthToken (rt ResponseType , tgr * TokenGenerateRequest ) (authToken TokenInfo , err error )
2929
30- // Generate the access token
30+ // generate the access token
3131 GenerateAccessToken (rt GrantType , tgr * TokenGenerateRequest ) (accessToken TokenInfo , err error )
3232
33- // Refreshing an access token
33+ // refreshing an access token
3434 RefreshAccessToken (tgr * TokenGenerateRequest ) (accessToken TokenInfo , err error )
3535
36- // Use the access token to delete the token information
36+ // use the access token to delete the token information
3737 RemoveAccessToken (access string ) (err error )
3838
39- // Use the refresh token to delete the token information
39+ // use the refresh token to delete the token information
4040 RemoveRefreshToken (refresh string ) (err error )
4141
42- // According to the access token for corresponding token information
42+ // according to the access token for corresponding token information
4343 LoadAccessToken (access string ) (ti TokenInfo , err error )
4444
45- // According to the refresh token for corresponding token information
45+ // according to the refresh token for corresponding token information
4646 LoadRefreshToken (refresh string ) (ti TokenInfo , err error )
4747}
0 commit comments