refusal

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package refusal writes the body every request goapiauth turns away answers with.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Unauthorized

func Unauthorized(w http.ResponseWriter, bearerError, code, message string)

Unauthorized answers 401 with the RFC 6750 Bearer challenge, naming bearerError in it where that is not empty, and the body Write gives it.

func Write

func Write(w http.ResponseWriter, status int, code, message string)

Write answers status with {"error": its status text, "message": message, "code": code}.

Types

This section is empty.

Jump to

Keyboard shortcuts

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