github

package module
v0.0.0-...-8a747b5 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

README

GitHub connector

GitHub connector is a OAuth plug-in designed to support GitHub OAuth login.

How to use

Build
./answer build --with github.com/answerdev/plugins/connector/github
Configuration
  • ClientID - GitHub OAuth client ID
  • ClientSecret - GitHub OAuth client secret

In the https://github.com/settings/applications/new page, config the Authorization callback URL as https://example.com/answer/api/v1/connector/redirect/github

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connector

type Connector struct {
	Config *ConnectorConfig
}

func (*Connector) ConfigFields

func (g *Connector) ConfigFields() []plugin.ConfigField

func (*Connector) ConfigReceiver

func (g *Connector) ConfigReceiver(config []byte) error

func (*Connector) ConnectorLogoSVG

func (g *Connector) ConnectorLogoSVG() string

func (*Connector) ConnectorName

func (g *Connector) ConnectorName() plugin.Translator

func (*Connector) ConnectorReceiver

func (g *Connector) ConnectorReceiver(ctx *plugin.GinContext, receiverURL string) (userInfo plugin.ExternalLoginUserInfo, err error)

func (*Connector) ConnectorSender

func (g *Connector) ConnectorSender(ctx *plugin.GinContext, receiverURL string) (redirectURL string)

func (*Connector) ConnectorSlugName

func (g *Connector) ConnectorSlugName() string

func (*Connector) Info

func (g *Connector) Info() plugin.Info

type ConnectorConfig

type ConnectorConfig struct {
	ClientID     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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