code: func (g *GRPCServer) authenticate(ctx context.Context) (*grpcContext, error) {
  	// HTTPS server expects auth  context to be set by the auth middleware
  	authContext, err := g.Authorizer.Authorize(ctx)
  	if err != nil {
  		// propagate connection problem error so we can differentiate
  		// between connection failed and access denied
  		if trace.IsConnectionProblem(err) {
  			return nil, trace.ConnectionProblem(err, "[10] failed to connect to the database")
  		} else if trace.IsAccessDenied(err) {
  			// don't print stack trace, just log the warning
  			log.Warn(err)
  		} else {
  			log.Warn(trace.DebugReport(err))
  		}
  		return nil, trace.AccessDenied("[10] access denied")
  	}
  	return &grpcContext{
  		AuthContext: authContext,
  		AuthWithRoles: &AuthWithRoles{
  			authServer: g.AuthServer,
  			user:       authContext.User,
  			checker:    authContext.Checker,
  			sessions:   g.SessionService,
  			alog:       g.AuthServer.IAuditLog,
  		},
  	}, nil
  }
docs: // authenticate extracts authentication context and returns initialized auth server