auth

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2022 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Overview

Package auth supplies a gtk.Assistant wrapper to provide a login screen.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Server    string `json:"server"`
	Token     string `json:"token"`
	UserID    string `json:"user_id"`
	Username  string `json:"username"`
	AvatarURL string `json:"avatar_url"`
}

type Assistant

type Assistant struct {
	*assistant.Assistant
	// contains filtered or unexported fields
}

func Show

func Show(ctx context.Context) *Assistant

Show creates a new authentication assistant with the default HTTP client.

func ShowWithClient

func ShowWithClient(ctx context.Context, client httputil.Client) *Assistant

ShowWithClient creates a new authentication assistant with the given HTTP client.

func (*Assistant) OnConnect

func (a *Assistant) OnConnect(f func(*gotktrix.Client, *Account))

OnConnect sets the handler that is called when the user chooses an account or logs in. If this method has already been called before with a non-nil function, it will panic.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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