local

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package local contains a local HTTP server used with interactive authentication.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	// Code is the code sent by the authority server.
	Code string
	// Err is set if there was an error.
	Err error
}

Result is the result from the redirect.

type Server

type Server struct {
	// Addr is the address the server is listening on.
	Addr string
	// contains filtered or unexported fields
}

Server is an HTTP server.

func New

func New(reqState string, port int) (*Server, error)

New creates a local HTTP server and starts it.

func (*Server) Result

func (s *Server) Result(ctx context.Context) Result

Result gets the result of the redirect operation. Once a single result is returned, the server is shutdown. ctx deadline will be honored.

func (*Server) Shutdown

func (s *Server) Shutdown()

Shutdown shuts down the server.

Jump to

Keyboard shortcuts

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