oauth

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorizeResponse

type AuthorizeResponse struct {
	URL string `` /* 138-byte string literal not displayed */
}

AuthorizeResponse is the JSON body of the authorize endpoint.

type Handler

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

Handler serves the Bitbucket OAuth connection lifecycle endpoints.

func NewHandler

func NewHandler(
	oauthSvc *oauth.Service,
	logger *zap.Logger,
) *Handler

NewHandler creates the OAuth HTTP handler.

func (*Handler) Register

func (h *Handler) Register(r fiber.Router)

func (*Handler) RegisterPublic

func (h *Handler) RegisterPublic(r fiber.Router)

type StatusResponse

type StatusResponse struct {
	Connected   bool     `json:"connected"`
	ConnectedAt *string  `json:"connected_at,omitempty" example:"2026-08-24T12:00:00Z"`
	ExpiresAt   *string  `json:"expires_at,omitempty"   example:"2026-08-24T14:00:00Z"`
	Scopes      []string `json:"scopes,omitempty"       example:"webhook"`
}

StatusResponse reports the current OAuth connection state. Optional fields are omitted when the connection is absent.

func NewStatusResponse

func NewStatusResponse(token *oauth.Token) StatusResponse

NewStatusResponse maps a stored OAuth token to the status DTO.

Jump to

Keyboard shortcuts

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