|
|
@@ -970,7 +970,7 @@ func (as *authStore) Revision() uint64 {
|
|
|
return atomic.LoadUint64(&as.revision)
|
|
|
}
|
|
|
|
|
|
-func (as *authStore) AuthInfoFromTLS(ctx context.Context) (ai *AuthInfo) {
|
|
|
+func (as *authStore) AuthInfoFromTLS(ctx context.Context) *AuthInfo {
|
|
|
peer, ok := peer.FromContext(ctx)
|
|
|
if !ok || peer == nil || peer.AuthInfo == nil {
|
|
|
return nil
|
|
|
@@ -982,7 +982,7 @@ func (as *authStore) AuthInfoFromTLS(ctx context.Context) (ai *AuthInfo) {
|
|
|
cn := chain.Subject.CommonName
|
|
|
plog.Debugf("found common name %s", cn)
|
|
|
|
|
|
- ai = &AuthInfo{
|
|
|
+ ai := &AuthInfo{
|
|
|
Username: cn,
|
|
|
Revision: as.Revision(),
|
|
|
}
|