coauth_core

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModeClient = iota
	ModePassword
)
View Source
const (
	ScopeRead      = "read"
	ScopeReadWrite = "read_write"
)
View Source
const (
	VersionOriginal = "1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Coauth

type Coauth interface {
	Init() error
	GetKey() string
	GetToken() string
}

func NewCoauth

func NewCoauth(addr, username, password string, options *Options) Coauth

type Options

type Options struct {
	Timeout       time.Duration // client超时时间
	Version       string        // 令牌版本
	Mode          int           // 令牌获取模式
	GrantUsername string        // 密码模式用户名
	GrantPassword string        // 密码模式密码
	Scope         string        // 权限
}

Jump to

Keyboard shortcuts

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