Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
e00f0b4c
Unverified
Commit
e00f0b4c
authored
Oct 16, 2019
by
rserpent
Committed by
GitHub
Oct 16, 2019
Browse files
Update dns_nic.sh
parent
dc5c220e
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_nic.sh
View file @
e00f0b4c
...
...
@@ -113,7 +113,7 @@ _nic_get_authtoken() {
export
_H1
=
"Authorization: Basic
$token
"
export
_H2
=
"Content-Type: application/x-www-form-urlencoded"
res
=
"
$(
_post
"grant_type=password&username=
$username
&password=
$password
&scope=%28GET%7CPUT%7CPOST%7CDELETE%29%3A%2Fdns-master%2F.%2B"
"
$NIC_Api
/oauth/token"
""
"POST"
)
"
res
=
$(
_post
"grant_type=password&username=
$username
&password=
$password
&scope=%28GET%7CPUT%7CPOST%7CDELETE%29%3A%2Fdns-master%2F.%2B"
"
$NIC_Api
/oauth/token"
""
"POST"
)
if
_contains
"
$res
"
"access_token"
;
then
_auth_token
=
$(
printf
"%s"
"
$res
"
|
cut
-d
,
-f2
|
tr
-d
"
\"
"
|
sed
"s/access_token://"
)
_info
"Token received"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment