mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-01 11:33:41 +03:00
fork off |init-oauth1 from |init-oauth2
and discard subdomains in both
This commit is contained in:
parent
738bd1946c
commit
be51072ade
34
gen/hood/init-oauth1.hoon
Normal file
34
gen/hood/init-oauth1.hoon
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
::
|
||||||
|
:::: /hoon/init-oauth1/hood/gen
|
||||||
|
::
|
||||||
|
/? 314
|
||||||
|
/- sole
|
||||||
|
::
|
||||||
|
::::
|
||||||
|
!:
|
||||||
|
[sole .]
|
||||||
|
:- %ask
|
||||||
|
|= $: {now/@da eny/@uvI bec/beak}
|
||||||
|
{arg/$@($~ {dom/path $~})}
|
||||||
|
$~
|
||||||
|
==
|
||||||
|
^- (sole-result {$write-sec-atom p/host q/@})
|
||||||
|
=- ?~ arg -
|
||||||
|
(fun.q.q [%& dom.arg])
|
||||||
|
%+ sole-lo
|
||||||
|
[%& %oauth-hostname "api hostname: https://"]
|
||||||
|
%+ sole-go thos:urlp
|
||||||
|
|= hot/host
|
||||||
|
?: ?=($| -.hot)
|
||||||
|
~|(%ips-unsupported !!)
|
||||||
|
=. p.hot (scag 2 p.hot) :: ignore subdomain
|
||||||
|
%+ sole-lo
|
||||||
|
[%& %oauth-client "consumer key: "]
|
||||||
|
%+ sole-go (boss 256 (star prn))
|
||||||
|
|= key/@t
|
||||||
|
%+ sole-lo
|
||||||
|
[%& %oauth-secret "consumer secret: "]
|
||||||
|
%+ sole-go (boss 256 (star prn))
|
||||||
|
|= sec/@t
|
||||||
|
%+ sole-so %write-sec-atom :: XX typed pair
|
||||||
|
[hot (role key sec ~)]
|
@ -21,6 +21,7 @@
|
|||||||
|= hot/host
|
|= hot/host
|
||||||
?: ?=($| -.hot)
|
?: ?=($| -.hot)
|
||||||
~|(%ips-unsupported !!)
|
~|(%ips-unsupported !!)
|
||||||
|
=. p.hot (scag 2 p.hot) :: ignore subdomain
|
||||||
%+ sole-lo
|
%+ sole-lo
|
||||||
[%& %oauth-client "client id: "]
|
[%& %oauth-client "client id: "]
|
||||||
%+ sole-go (boss 256 (star prn))
|
%+ sole-go (boss 256 (star prn))
|
||||||
|
Loading…
Reference in New Issue
Block a user