Documentation ¶
Index ¶
- func ClientFormHandler(r *http.Request) (string, string, error)
- type ApiWrapper
- func (a *ApiWrapper) ApproveAuthorization(w http.ResponseWriter, r *http.Request)
- func (a *ApiWrapper) GetAccessToken(ctx context.Context, s *server.Server, gt oauth2.GrantType, ...) (oauth2.TokenInfo, error)
- func (a *ApiWrapper) UserAuthorizeHandler(w http.ResponseWriter, r *http.Request) (userID string, err error)
- type ApproveAuthorizationRequest
- type ApproveAuthorizationResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ApiWrapper ¶
type ApiWrapper struct { RedisStore *store.RedisStore SupabaseAuth *database.SupabaseAuth AesCrypt *utils.AESCrypt DB *ent.Client Repo *repository.Repository }
func (*ApiWrapper) ApproveAuthorization ¶
func (a *ApiWrapper) ApproveAuthorization(w http.ResponseWriter, r *http.Request)
When the user approves this authorization request from the UI
func (*ApiWrapper) GetAccessToken ¶
func (a *ApiWrapper) GetAccessToken(ctx context.Context, s *server.Server, gt oauth2.GrantType, tgr *oauth2.TokenGenerateRequest) (oauth2.TokenInfo, error)
GetAccessToken access token
func (*ApiWrapper) UserAuthorizeHandler ¶
func (a *ApiWrapper) UserAuthorizeHandler(w http.ResponseWriter, r *http.Request) (userID string, err error)
type ApproveAuthorizationRequest ¶
type ApproveAuthorizationRequest struct { // The authorization code Code string `json:"app_code"` }
type ApproveAuthorizationResponse ¶
type ApproveAuthorizationResponse struct {
RedirectURL string `json:"redirect_url"`
}
Click to show internal directories.
Click to hide internal directories.