Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
micro-teaching-assistant-fucker
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Recolic
micro-teaching-assistant-fucker
Commits
fea0b654
There was an error fetching the commit references. Please try again later.
Commit
fea0b654
authored
6 years ago
by
qzwlecr
Browse files
Options
Downloads
Patches
Plain Diff
bugfix: satisfy re-sign API.
parent
d572a954
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
impl/daemon-signin.fish
+5
-1
5 additions, 1 deletion
impl/daemon-signin.fish
with
5 additions
and
1 deletion
impl/daemon-signin.fish
+
5
−
1
View file @
fea0b654
#!/usr/bin/fish
test -z $_openid; and echo 'openid is unset.' ; and exit 1
set _url "https://www.teachermate.com.cn/wechat/wechat/guide/signin?openid=$_openid"
set _url "https://v18.teachermate.cn/wechat/wechat/guide/signin?openid=$_openid"
set _resign_url "https://v18.teachermate.cn/api/v1/wechat/re-auth?m=s_signin&code=$_openid&state=$_openid"
#simply reuse openid for resign
source ../config.fish
...
...
@@ -59,6 +61,8 @@ while true
test -f $tmpfl; and sleep $_monitor_interval
date
curl -L "$_url" -v 2>$cookiefl > $tmpfl
#First sign is not necessary now, but maybe useful later
curl -L "$_resign_url" -v 2>$cookiefl > $tmpfl
if grep '{"data":\[\],"msg":"unauthorized"}' $tmpfl
on_badid
continue
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment