public function getAccessToken($code, $grant = 'authorization_code')
    {
        $token = $this->container->get(RedirectLoginHelper::class)
            ->getAccessToken($code, $grant);
        $this->setAccessToken($token);
        return $token;
    }
public function getAccessToken($code, $grant = 'authorization_code')
    {
        $token = $this->container->get(RedirectLoginHelper::class)
            ->getAccessToken($code, $grant);
        $this->setAccessToken($token);
        return $token;
    }
public function getAccessToken ( $ code , $ grant = 'authorization_code' ) { $ token = $ this -> container -> get ( RedirectLoginHelper :: class ) -> getAccessToken ( $ code , $ grant ) ; $ this -> setAccessToken ( $ token ) ; return $ token ; }
Sets and returns the access token.

@param string $code
@param string $grant

@return AccessToken

@see Elogram\Helpers\RedirectLoginHelper::getAccessToken()

@codeCoverageIgnore
Sets and returns the access token .