endpoint

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// Port is the port the server is listening on
	Port int
	// contains filtered or unexported fields
}

Server represents an auth callback endpoint

func New

func New() (*Server, error)

New creates an auth callback endpoint on a random available port

func (Server) AuthCode

func (h Server) AuthCode() string

AuthCode returns the authorization code from the callback

func (*Server) Close

func (s *Server) Close()

Close closes the endpoint

func (Server) Error

func (h Server) Error() string

Error returns any error that occurred during the OAuth flow

func (Server) ErrorDescription

func (h Server) ErrorDescription() string

ErrorDescription returns the error description if an error occurred

func (*Server) RedirectURL added in v0.25.0

func (s *Server) RedirectURL() string

func (Server) ServeHTTP

func (h Server) ServeHTTP(writer http.ResponseWriter, request *http.Request)

ServeHTTP handles HTTP requests

func (*Server) Start

func (s *Server) Start()

Start starts the endpoint and listens for requests

func (*Server) Wait

func (s *Server) Wait() error

Wait waits until the server receives the authentication callback

Jump to

Keyboard shortcuts

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