protected function getNameId($user, $authnRequest)
    {
        $nameIdAttribute = config('saml.sp.'.base64_encode($authnRequest->getAssertionConsumerServiceURL()).'.nameID', 'email');
        return $user->{$nameIdAttribute};
    }