Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { IdentityProvider IdentityProvider Account Account }
API represents Github API client.
func NewAPI ¶
func NewAPI(identityProvider IdentityProvider, account Account) API
NewAPI creates Github API client.
type Account ¶
type Account struct {
// contains filtered or unexported fields
}
Account accesses user's account data through Github API v4.
func NewAccount ¶
func NewAccount(gqlClientFactory graphql.ClientFactory) Account
NewAccount initializes Github account API client.
type AccountLinker ¶
type AccountLinker sso.AccountLinker
AccountLinker links user's Github account with Short account.
type IdentityProvider ¶
type IdentityProvider struct {
// contains filtered or unexported fields
}
IdentityProvider represents Github OAuth service.
func NewIdentityProvider ¶
func NewIdentityProvider(http webreq.HTTP, clientID string, clientSecret string) IdentityProvider
NewIdentityProvider initializes Github OAuth service.
func (IdentityProvider) GetAuthorizationURL ¶
func (g IdentityProvider) GetAuthorizationURL() string
GetAuthorizationURL retrieves the URL of Github sign in page.
func (IdentityProvider) RequestAccessToken ¶
func (g IdentityProvider) RequestAccessToken(authorizationCode string) (accessToken string, err error)
RequestAccessToken retrieves access token of user's Github account using authorization code.
type SingleSignOn ¶
type SingleSignOn sso.SingleSignOn
SingleSignOn enables users to sign in through their Github account.
Click to show internal directories.
Click to hide internal directories.