草庐IT

gitlab-ci-token

全部标签

php - 在google api中手动使 token 过期

我的谷歌token似乎需要等待60分钟才能过期。我正在尝试测试有关如何刷新token的代码是否正常工作,我没有时间等待60分钟来测试它是否正常工作。有没有办法手动使谷歌token过期,以便我可以测试我的刷新token代码是否有效? 最佳答案 通过撤销access_token,您也撤销了refresh_token,docs:Thetokencanbeanaccesstokenorarefreshtoken.Ifthetokenisanaccesstokenandithasacorrespondingrefreshtoken,there

Travis CI 上的 PHPUnit "Could not read phpunit.xml"

尝试在TravisCI上运行PHP单元测试时,我遇到了一个奇怪的问题。.travis.ymlsudo:falselanguage:phpphp:-5.4env:-VUFIND_HOME=$PWDVUFIND_LOCAL_DIR=$PWD/localbefore_script:-pearinstallpear/PHP_CodeSniffer-pearchannel-discoverpear.phing.info-pearinstallphing/phing-composerglobalrequirefabpot/php-cs-fixer-exportPATH="$HOME/.compos

php - 登录表单 POST 上的 Laravel 5.1 token 不匹配

我在compiled.php第2930行中收到以下错误TokenMismatchException:代码在RedHat服务器上运行php5.6我也在Ubuntu服务器上运行php5.5.9它工作得很好。它还在本地完美运行。它似乎在原始GET请求的storage/framework/sessions中创建了2个session文件,这意味着当通过POST发送表单时>session就不同了。我检查过重定向服务器上的日期/时区问题session.php和app.php中的配置问题最奇怪的是为什么在GET请求中生成了2个session文件。一旦您点击登录按钮,您就会点击csrf中间件,说toke

php - 使用 Laravel Socialite 获取谷歌刷新 token

使用LaravelSocailite连接到GoogleAPI,我可以正常恢复连接,但是此访问不会返回刷新token,因此我的连接超时。$scopes=['https://www.googleapis.com/auth/webmasters','https://www.googleapis.com/auth/webmasters.readonly','https://www.googleapis.com/auth/analytics.readonly','https://www.googleapis.com/auth/userinfo.profile','https://www.goog

php - 我不明白 JWT 刷新 token 的行为 (LARAVEL)

我刚刚尝试使用LARAVEL和这个https://github.com/tymondesigns/jwt-auth进行JWT身份验证但是有些事情我无法理解。在他们的配置中,他们放置了:'ttl'=>env('JWT_TTL',60),//inmunutes'refresh_ttl'=>env('JWT_REFRESH_TTL',20160),//inminutes我所理解的:token的生命是1小时,可以在2周内刷新但3小时后,如果我尝试查询某些内容,它会显示“token已过期”。这个系统是否意味着,用户必须在每小时内更新/刷新他的token,但限制为2周?我不明白。用户如何使用这种系

php - Gitlab Ci 使用 docker 和 mysql 服务缓慢构建

我正在使用gitlab-ci-multirunner9.3.0和GitLabCommunityEdition9.3.5当我在我的本地虚拟盒子环境中运行我的php-unit测试时,总测试(30)只需要大约:Time:5minutes,Memory:96.00MB在我的gitlab主机上运行同样的测试,一共需要Time:41.68minutes,Memory:97.75MB测试需要mysql并在每个测试上创建数据库和加载夹具。我的DockerFile:FROMtetraweb/php:5.6#InstalladditionalpackagesRUNapt-getclean&&apt-get

php - Firebase FCM 错误 JSON_PARSING_ERROR : Unexpected token END OF FILE at position

我正在尝试使用php通过firebase的fcm服务发送通知。这是我到目前为止得到的:$ch=curl_init();$payload=['to'=>'/topics/'.ANDROID_TOPIC,'notification'=>['message'=>1]];$headers=['Content-Type:application/json','Content-length:'.sizeof(json_encode($payload)),'Authorization:key='.FIREBASE_KEY];curl_setopt($ch,CURLOPT_URL,'https://fc

php - Firebase 云消息传递 HTTP V1 API : How to Get the Auth 2. 0 访问 token 与 REST 调用?

为了在PHP中使用HTTPV1API(不是遗留API),必须使用REST接口(interface)。https://firebase.google.com/docs/cloud-messaging/send-message#top_of_page我想知道如何获得Auth2.0访问token?https://firebase.google.com/docs/cloud-messaging/auth-server由于没有适用于PHP的GoogleAPI客户端库(请参阅上面链接中的示例),如何通过REST调用接收Auth2.0token(无需显示PHP代码)?相关问题:一旦收到这个短命tok

php - OAuth2 token ,消息 : '{ "error": "access_denied" }' returned when I try to update Google Calendar using OAuth (Service Account)

我正在使用适用于PHP的Google标准库来使用日历服务,并且我已经通过GoogleAPI控制台为OAuth2.0身份验证设置了一个服务帐户类型。我的主要目标是通过批量更新用户的谷歌日历(例如:user@organisationname.com)(当用户不在线时)。例如。更新用户日历中的事件。当用户登录应用程序(使用OAuth2.0)时,他/她将为应用程序提供“管理您的日历”、“查看您的日历”和“在我不使用应用”以下代码用于使用OAuth2.0登录setApplicationName("GoogleCalendarPHPStarterApplication");$client->set

php - CI中的ajax jquery分页错误

在codeigniter中的jquery分页中出现错误。ifper_page=5;totalnumber6andtotalpage2butthepaginationlikebelowShowing6to6of6|嗨,friend们,我陷入了这个错误。这显示在每个页面中。请给我一个解决方案来获得正确的分页下面的代码正在使用:$config['base_url']=site_url('settings/view_leave_reason_ajax/');$config['total_rows']=$this->leav->getLvReasonCount();$config['per_pa