Tag: Oauth2
-
Post Views: 16 1. After enabling 2FA two-factor authentication, git.exe pull –progress -v –no-rebase “origin” Remote: HTTP Basic: Access Denied Remote: You must use a personal access token withREAD_REpositoryOrwrite_repositoryScope for git over http. Remote: You can generate one athttps://xxx.com/-/profile/personal_access_tokens Fatal: Authentication failed forhttps://xxx.com/xgrit/object.git/ Git failed to end smoothly (exit code 1) (5344 ms @ 2022/6/29 10:42:11). as shown in Figure…
-
Post Views: 11 1. Based onhttps://github.com/Filsh/yii2-oauth2-server实现; Run: php composer.phar require –prefer-dist filsh/yii2-oauth2-server “*” 2. Configure in the application: E:\wwwroot\api.hmwis.com\passport\config\main.php Modules=>[ oauth2=> [ class=>FILSH\Yii2\OAuth2Server\Module, tokenparamname=>accessToken, TokenAccessLifeTime=> 3600 * 24, StorageMap=> [ user_credentials=>common\models\user, ]#ATFP_CLOSE_Translate_span#, GrantTypes=>[ user_credentials=> [ class=>oauth2\grantType\usercredentials, ]#ATFP_CLOSE_Translate_span#, refresh_token=>[ class=>oauth2\grantType\refreshtoken, Always_issue_new_refresh_token=> true ]#ATFP_CLOSE_Translate_span# ] ], v1=>[ class=>passport\modules\v1\module, ]#ATFP_CLOSE_Translate_span#, ], 3. Edit the user model class User.php: E:\wwwroot\api.hmwis.com\common\models\user.php Implement the interface\OAuth2\Storage\UserCredentialsInterface Class…
-
Post Views: 12 1. The address of the REST API application with OAuth2 Server on Yii2:https://github.com/ikaras/yii2-oauth2-rest-template 2. Run the command: php application/api/yiic migrate –migrationpath=@vendor/filsh/yii2-oauth2-server/migrations –interactive=0 \ Error: 3. Modify the file: \yii2-oauth2-rest-template\vendor\filsh\yii2-oaut h2-server\migrations\m140501_075311_add_oauth2_server.php 4. Run the command again: php application/api/yiic migrate –migrationpath=@vendor/filsh/yii2-oauth2-server/migrations –interactive=0\ , normal operation: