auth

package
v0.19.783 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AuthDomain   string
	AuthClientID string
	AuthAudience string
)

Functions

This section is empty.

Types

type DeviceCodeRes

type DeviceCodeRes struct {
	DeviceCode      string `json:"device_code"`
	UserCode        string `json:"user_code"`
	VerificationURL string `json:"verification_uri_complete"`
}

type IDClaims

type IDClaims struct {
	Email string `json:"email"`
	Name  string `json:"name"`
	jwt.RegisteredClaims
}

type LoginResult

type LoginResult struct {
	AccessToken string
	DisplayName string
}

LoginResult contains the result of an authentication flow

type NuonAuthTokenResponse

type NuonAuthTokenResponse struct {
	AccessToken      string `json:"access_token,omitempty"`
	TokenType        string `json:"token_type,omitempty"`
	Email            string `json:"email,omitempty"`
	Error            string `json:"error,omitempty"`
	ErrorDescription string `json:"error_description,omitempty"`
}

NuonAuthTokenResponse represents the response from the device token endpoint

type Service

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

func New

func New(apiClient nuon.Client, cfg *config.Config) *Service

func (*Service) Login

func (a *Service) Login(ctx context.Context) error

func (*Service) Logout

func (a *Service) Logout(ctx context.Context) error

type TokenResp

type TokenResp struct {
	AccessToken string `json:"access_token"`
	IDToken     string `json:"id_token"`
}

type UserInfo

type UserInfo struct {
	Email string
	Name  string
}

Jump to

Keyboard shortcuts

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