twirp_auth2

package
v0.0.0-...-4ff3f89 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthHelper

type AuthHelper struct {
}

AuthHelper provides methods for authenticating users.

func New

func New() *AuthHelper

New returns an AuthHelper instance.

func (*AuthHelper) GetEditor

func (h *AuthHelper) GetEditor(ctx context.Context) (string, error)

GetEditor returns the email address of the logged-in user or an error if the user is not in the set of allowed editors. Do not wrap the returned error, as it is used by Twirp.

func (*AuthHelper) GetViewer

func (h *AuthHelper) GetViewer(ctx context.Context) (string, error)

GetViewer returns the email address of the logged-in user or an error if the user is not in the set of allowed viewers. Do not wrap the returned error, as it is used by Twirp.

Jump to

Keyboard shortcuts

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