Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) GetUserInfo(accessToken string) (info UserInfo, err error)
- func (c *Client) IssueCode(email, password string) (code string, err error)
- func (c *Client) IssueToken(code string) (access, refresh string, err error)
- func (c *Client) ReIssueToken(refreshToken string) (access, refresh string, err error)
- type ClientOpts
- type GauthErr
- type UserInfo
Constants ¶
View Source
const ( GenderMale gender = "MALE" GenderFemale gender = "FEMALE" )
View Source
const ( RoleStudent role = "ROLE_STUDENT" RoleTeacher role = "ROLE_TEACHER" RoleGraduate role = "ROLE_GRADUATE" )
View Source
const ( AuthURL = "https://server.gauth.co.kr" ResourceURL = "https://open.gauth.co.kr" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(httpClient *http.Client, opts ClientOpts) *Client
NewDefaultClient creates GAuth client with given client
func NewDefaultClient ¶
func NewDefaultClient(opts ClientOpts) *Client
NewDefaultClient creates GAuth client with http.DefaultClient
func (*Client) GetUserInfo ¶
GetUserInfo retrieves userInfo with given access token
func (*Client) IssueToken ¶
IssueToken retrieves access & refresh token with given code
type ClientOpts ¶
Click to show internal directories.
Click to hide internal directories.