Documentation
¶
Index ¶
Constants ¶
View Source
const ( Admin = "admin" Root = "root" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MyAuth ¶
MyAuth 自定义 Auth 需要实现 credentials.PerRPCCredentials 接口
func (*MyAuth) GetRequestMetadata ¶
GetRequestMetadata 定义授权信息的具体存放形式,最终会按这个格式存放到 metadata map 中。
func (*MyAuth) RequireTransportSecurity ¶
RequireTransportSecurity 是否需要基于 TLS 加密连接进行安全传输
Directories
¶
Path | Synopsis |
---|---|
The client demonstrates how to supply an OAuth2 token for every RPC.
|
The client demonstrates how to supply an OAuth2 token for every RPC. |
The server demonstrates how to consume and validate OAuth2 tokens provided by clients for each RPC.
|
The server demonstrates how to consume and validate OAuth2 tokens provided by clients for each RPC. |
Click to show internal directories.
Click to hide internal directories.