auths

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticationInfo

type AuthenticationInfo interface {
	// 委托人
	Principal() lang.Object
	Roles() string
	Success() bool
	Message() string
}

Authentication (认证) info

type AuthenticationManager

type AuthenticationManager interface {
	Providers() []AuthenticationProvider
	Authenticate(token AuthenticationToken) (AuthenticationInfo, error)
}

Authentication 管理器

type AuthenticationProvider

type AuthenticationProvider interface {
	Name() string
	Supports(token AuthenticationToken) bool
	Authenticate(token AuthenticationToken) (AuthenticationInfo, error)
}

Authentication 服务提供者

type AuthenticationToken

type AuthenticationToken interface {

	// 实现机制
	Mechanism() string

	// 委托人
	Principal() lang.Object

	// 凭证
	Credentials() lang.Object
}

Authentication (认证) token

type Authorization

type Authorization interface {
	Roles() []string
	Permissions() []string
}

Authorization 授权

type AuthorizationService

type AuthorizationService interface {
}

Authorization 服务

type DefaultAuthenticationManager

type DefaultAuthenticationManager struct {
	// context      application.Context
	ProviderList []AuthenticationProvider
}

func (*DefaultAuthenticationManager) Authenticate

func (*DefaultAuthenticationManager) Providers

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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