servers

package
v2.0.0-...-c53fd5d Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LoginHtml = `` /* 1443-byte string literal not displayed */

	AuthorizeHtml = `` /* 1499-byte string literal not displayed */

)

Functions

func Run

func Run(host, port string)

Types

type AuthProcessor

type AuthProcessor interface {
	OnGrantTokenSuccess(token *entities.Token, w http.ResponseWriter, r *http.Request)
	OnGrantTokenFailed(err error, w http.ResponseWriter, r *http.Request)

	ExtractToken(r *http.Request) (string, error)
}

type GinServer

type GinServer struct {
	// contains filtered or unexported fields
}

func NewGinServer

func NewGinServer(ctx *oauth2.OAuth2Context) *GinServer

func (*GinServer) RunWithEngine

func (s *GinServer) RunWithEngine(addr string, engine *gin.Engine)

type RestfulServer

type RestfulServer struct {
	// contains filtered or unexported fields
}

func NewRestfulServer

func NewRestfulServer(ctx *oauth2.OAuth2Context) *RestfulServer

func (*RestfulServer) Handle

func (s *RestfulServer) Handle(c *restful.Container)

func (*RestfulServer) Run

func (s *RestfulServer) Run(host, port string)

func (*RestfulServer) RunWithContainer

func (s *RestfulServer) RunWithContainer(wsContainer *restful.Container, host, port string)

type SimpleSite

type SimpleSite struct {
	// contains filtered or unexported fields
}

func NewSimpleSite

func NewSimpleSite(clientId, clientSecret string, cli *http2.HttpClient) *SimpleSite

func (*SimpleSite) Authorize

func (s *SimpleSite) Authorize(ctx context.Context, authorizeUrl string, w http.ResponseWriter, r *http.Request)

func (*SimpleSite) AuthorizeHtml

func (s *SimpleSite) AuthorizeHtml(authorizeUrl string, w http.ResponseWriter, r *http.Request)

func (*SimpleSite) Login

func (s *SimpleSite) Login(ctx context.Context, authUserPasswordUrl, authorizeHtmlUrl string, w http.ResponseWriter, r *http.Request)

func (*SimpleSite) LoginHtml

func (s *SimpleSite) LoginHtml(loginUrl string, w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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