package local

import "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/local"

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

Index

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.

Source Files

server.go

Version
v1.4.2 (latest)
Published
Mar 26, 2025
Platform
linux/amd64
Imports
8 packages
Last checked
2 days ago

Tools for package owners.