Source File
authinfo.go
Belonging Package
google.golang.org/grpc/credentials/alts/internal/authinfo
package authinfo
import (
altspb
)
var _ credentials.AuthInfo = (*altsAuthInfo)(nil)
type altsAuthInfo struct {
p *altspb.AltsContext
credentials.CommonAuthInfo
}
func ( *altspb.HandshakerResult) credentials.AuthInfo {
return newAuthInfo()
}
func ( *altspb.HandshakerResult) *altsAuthInfo {
return &altsAuthInfo{
p: &altspb.AltsContext{
ApplicationProtocol: .GetApplicationProtocol(),
SecurityLevel: altspb.SecurityLevel_INTEGRITY_AND_PRIVACY,
PeerServiceAccount: .GetPeerIdentity().GetServiceAccount(),
LocalServiceAccount: .GetLocalIdentity().GetServiceAccount(),
PeerRpcVersions: .GetPeerRpcVersions(),
PeerAttributes: .GetPeerIdentity().GetAttributes(),
},
CommonAuthInfo: credentials.CommonAuthInfo{SecurityLevel: credentials.PrivacyAndIntegrity},
}
}
func ( *altsAuthInfo) () string {
return "alts"
}
func ( *altsAuthInfo) () string {
return .p.GetApplicationProtocol()
}
func ( *altsAuthInfo) () string {
return .p.GetRecordProtocol()
}
func ( *altsAuthInfo) () altspb.SecurityLevel {
return .p.GetSecurityLevel()
}
func ( *altsAuthInfo) () string {
return .p.GetPeerServiceAccount()
}
func ( *altsAuthInfo) () string {
return .p.GetLocalServiceAccount()
}
func ( *altsAuthInfo) () *altspb.RpcProtocolVersions {
return .p.GetPeerRpcVersions()
}
func ( *altsAuthInfo) () map[string]string {
return .p.GetPeerAttributes()
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |