Get the signer instance.

@throws \Tymon\JWTAuth\Exceptions\JWTException

@return \Lcobucci\JWT\Signer
971025
protected function getSigner()
    {
        if (! array_key_exists($this->algo, $this->signers)) {
            throw new JWTException('The given algorithm could not be found');
        }

        return new $this->signers[$this->algo];
    }
1252462
public function getUser()
    {
        if ($user = $this->provider->user()) {
            return ($field = $this->field) ? (string) $user->{$field} : $user->getAuthIdentifier();
        }
    }
1081938
public function getToken(){
        if(!$this->token){
            if($this->getHeader('Authorization') != NULL){
                $this->token= $this->getHeader('Authorization');
            }
            if(!$this->token && $this->getParam('token')){
                $this->token= $this->getParam('token');
            }
        }
        return $this->token;
    }
74964
public function getToken()
    {
        if (!$this->token) {
            $session = new Session('Auth');
            if (!$session->token) {
                $session->token = uniqid();
            }
            $this->token = $session->token;
        }
        return $this->token;
    }
118853
protected function getTokenByClientCredentialsGrant()
    {
        $token = $this->getAuthorizationServer()->getAccessToken('client_credentials', [
            'scope' => $this->config['client_credentials']['scope'],
        ]);

        $this->getFrameworkBridge()->persistClientToken(
            $this->config['client_credentials']['client_id'],
            $token->getToken(),
            $token->getExpires(),
            $token->getValues()['role']
        );

        return $token;
    }
492966
public function getToken()
    {
        if (!isset($this->token)) {
            $this->token = $this->csrf->getToken();
        }

        return $this->token;
    }
197978
public function getInstantiator(): Instantiator
    {
        if (is_null($this->instantiator)) {
            $this->setInstantiator(new Instantiator(null, $this));
        }

        return $this->instantiator;
    }
4032
public function getToken()
    {
        if (! $this->token) {
            try {
                $this->parseToken();
            } catch (JWTException $e) {
                return false;
            }
        }

        return $this->token;
    }
374767
public function user()
    {
        /*
         * If we have already retrieved the user for the current request we can
         * just return it back immediately.
         */
        if (! is_null($this->user)) {
            return $this->user;
        }

        // Attempt to retrieve the token from the request
        $token = $this->jwt->getToken();
        if (! $token) {
            return null;
        }

        // Get the user associated with the token
        try {
            $user = $this->jwt->toUser($token);
        } catch (JWTException $e) {
            return null;
        }

        return $this->user = $user;
    }
41284
private function getAccessToken()
    {
        if ($this->provider === null)
            throw new EmptyProviderException();
        $this->getLogger()->debug('Checking Access token and requesting a new one if necessary');
        if ($this->token == null || $this->token->hasExpired() || $this->token->getExpires() <= time() + 10) {
            // Get and store a new token
        $this->getLogger()->info('Getting a new Access Token');
            $this->token = $this->provider->getAccessToken('client_credentials');
        }
        else {
            $this->token = $this->token;
        }
        return $this->token;
    }
82370
public function getAuthUser()
    {
        $user = null;
        if ($this->api_auth()->check()) {
            $user = $this->api_auth()->user();
        } else if (\Auth::check()) {
            $user = \Auth::user();
        }
        return $user;
    }
699418
public function user()
    {
        // If we've already retrieved the user for the current request we can just
        // return it back immediately. We do not want to fetch the user data on
        // every call to this method because that would be tremendously slow.
        if (! is_null($this->user)) {
            return $this->user;
        }

        $user = null;

        if ($this->jwt->isHealthy()) {
            $id = $this->jwt->getId();
            $user = $this->provider->retrieveById($id);
        }

        return $this->user = $user;
    }
780641
public function getAuthToken()
    {
        if(!isset($this->__token))
        {
            $token   = false;
            $request = $this->getObject('request');

            if($request->headers->has('Authorization'))
            {
                $header = $request->headers->get('Authorization');

                if(stripos($header, 'jwt') === 0) {
                    $token = substr($header , 4);
                }
            }

            if($request->isSafe())
            {
                if($request->query->has('auth_token')) {
                    $token = $request->query->get('auth_token', 'url');
                }
            }
            else
            {
                if($request->data->has('auth_token')) {
                    $token = $request->data->get('auth_token', 'url');
                }
            }

            if($token) {
                $token = $this->getObject('lib:http.token')->fromString($token);
            }

            $this->__token = $token;
        }

        return $this->__token;
    }
856
protected function registerJWTAuth()
    {
        $this->app->singleton('tymon.jwt.auth', function ($app) {
            return (new JWTAuth(
                $app['tymon.jwt.manager'],
                $app['tymon.jwt.provider.auth'],
                $app['tymon.jwt.parser']
            ))->lockSubject($this->config('lock_subject'));
        });
    }
1240060
public function sign()
    {
        $this->crt = new SignedCertificate();

        $this->_altConfiguration();

        //print_r($this->altNames);

        /*
        print_r([
            $this->certConfigure, $this->domainName()->get()
        ]);
        */

        $this->crt->setPrivateKey($this->_generatePK());


        $privKey = $this->crt->getPrivateKey();
        $this->crt->setCsr(openssl_csr_new($this->domainName()->get(), $privKey, $this->certConfigure));

        if (!$this->caName == null) {
            // If CA name is not null sign certificate with loaded CA certificate
            $this->crt->setSignedCert(openssl_csr_sign(
                $this->crt->getCsr(), $this->_getCaCert(), $this->_getCaKey(), $this->_getConfig('daysvalid'), $this->certConfigure, time()
            ));
        } else {
            /**
             * Else self sign certificate
             * Its important for ROOT Certification authority certificate
             */
            $this->crt->setSignedCert(openssl_csr_sign(
                $this->crt->getCsr(), null, $this->crt->getPrivateKey(), $this->_getConfig('daysvalid'), $this->certConfigure, time()
            ));
        }

        return $this;
    }
173422
public function get()
    {
        if ($this->adminUser instanceof AdminUserInterface) {
            return $this->adminUser;
        }

        $token = $this->tokenStorage instanceof TokenStorageInterface
            ? $this->tokenStorage->getToken()
            : null;

        $this->adminUser = ($token instanceof UsernamePasswordToken)
            ? $token->getUser()
            : $this
                ->adminUserFactory
                ->create();

        return $this->adminUser;
    }
1365721
public function getSignedRequest() {
    if (!$this->signedRequest) {
      if (!empty($_REQUEST['signed_request'])) {
        $this->signedRequest = $this->parseSignedRequest(
          $_REQUEST['signed_request']);
      } else if (!empty($_COOKIE[$this->getSignedRequestCookieName()])) {
        $this->signedRequest = $this->parseSignedRequest(
          $_COOKIE[$this->getSignedRequestCookieName()]);
      }
    }
    return $this->signedRequest;
  }