api

package
v0.0.0-...-bfbcaf2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientFormHandler

func ClientFormHandler(r *http.Request) (string, string, error)

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL