auth

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2021 License: MPL-2.0 Imports: 0 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Data

func Data() interface{}

Data returns the structured auth data for the request. It returns nil if the request was made without authentication details, and the API endpoint does not require them.

Expected usage is to immediately cast it to the registered auth data type:

usr, ok := auth.Data().(*user.Data)
if !ok { /* ... */ }

Types

type UID

type UID string

UID is a unique identifier representing a user (a user id).

func UserID

func UserID() (UID, bool)

UserID reports the uid of the user making the request. The second result is true if there is a user and false if the request was made without authentication details.

Jump to

Keyboard shortcuts

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