func NewS2AAuthInfo(result *grpcpb.SessionResult) (credentials.AuthInfo, error)
NewS2AAuthInfo returns a new S2AAuthInfo object from the S2A session result.
S2AAuthInfo exposes authentication and authorization information from the S2A session result to the gRPC stack.
type S2AAuthInfo struct {
// contains filtered or unexported fields
}
func (s *S2AAuthInfo) ApplicationProtocol() string
ApplicationProtocol returns the application protocol, e.g. "grpc".
func (s *S2AAuthInfo) AuthType() string
AuthType returns the authentication type.
func (s *S2AAuthInfo) Ciphersuite() commonpb.Ciphersuite
Ciphersuite returns the ciphersuite negotiated during the handshake.
func (s *S2AAuthInfo) IsHandshakeResumed() bool
IsHandshakeResumed returns true if a cached session was used to resume the handshake.
func (s *S2AAuthInfo) LocalCertFingerprint() []byte
LocalCertFingerprint returns the SHA256 hash of the local certificate used in the S2A handshake.
func (s *S2AAuthInfo) LocalIdentity() *commonpb.Identity
LocalIdentity returns the local identity of the application used during session setup.
func (s *S2AAuthInfo) PeerCertFingerprint() []byte
PeerCertFingerprint returns the SHA256 hash of the peer certificate used in the S2A handshake.
func (s *S2AAuthInfo) PeerIdentity() *commonpb.Identity
PeerIdentity returns the authenticated identity of the peer.
func (s *S2AAuthInfo) SecurityLevel() credentials.SecurityLevel
SecurityLevel returns the security level of the connection.
func (s *S2AAuthInfo) TLSVersion() commonpb.TLSVersion
TLSVersion returns the TLS version negotiated during the handshake.