首页 > 其他分享 >docker desktop url protocl 技术以及使用

docker desktop url protocl 技术以及使用

时间:2022-10-16 22:35:01浏览次数:93  
标签:protocl url protocol desktop className createElement docker

docker desktop 在登录的使用使用了自定义的url 协议,同时基于web 进行系统登录,认证完成之后会生成code,之后通过
url 协议进入

使用

  • docker
    协议定义

 

<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>docker-desktop</string>
<key>CFBundleURLSchemes</key>
<array>
<string>docker-desktop</string>
</array>
</dict>
</array>

js 使用
​​​https://d36jcksde1wxzq.cloudfront.net/9241.d6356172711deaa97954.js​​​
处理

 

function v() {
const {search: a} = (0,
s.TH)()
e = p()
c = `docker-desktop://auth0/complete-login${a}`;
return (0,
l.useEffect)((()=>{
window.Cypress || (window.location.href = c)
}
c]),
l.createElement(l.Fragment, null, l.createElement(h.ql, {
title: "Redirecting..."
l.createElement(t.Z, {
maxWidth: "sm",
className: e.root,
"data-testid": "desktop-auth-page"
l.createElement(m.Z, {
className: e.logo
l.createElement(n.Z, {
className: e.paper
l.createElement(r.Z, {
variant: "h2",
component: "h1",
className: e.title
"You're almost done!"), l.createElement(r.Z, {
className: e.explanation
"We're redirecting you to the desktop app. If you don't see a dialog, please click the button below."), l.createElement(o.Z, {
href: c,
variant: "contained",
color: "primary"
"Proceed to Docker Desktop"))))
}
}

参考请求格式

docker-desktop://auth0/complete-login?code=<code>

说明

app protocl 在一些基于web 认证的桌面应用中使用比较多,比如electron 就支持app protocl 可以方便的做一些认证集成
语雀,飞书等应用都已经默认包含了自己的url protocl

参考资料

​https://www.npmjs.com/package/protocol-registry​​​
​​​https://github.com/Shubham-Kumar-2000/protocol-registry​​​
​​​https://stackoverflow.com/questions/18534591/how-to-register-a-url-protocol-handler-in-node-js/67231906#67231906​​​
​​​http://www.electronjs.org/docs/latest/api/protocol​

标签:protocl,url,protocol,desktop,className,createElement,docker
From: https://blog.51cto.com/rongfengliang/5760742

相关文章

  • Java 提取url的域名
      有时候,我们需要校验URL的域名是否在白名单中,故需要提取其中的域名。可以使用java标准类库java.net.URL进行提取,方法如下:importorg.apache.commons.lang3.StringUtils......
  • curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack
    脚本网不通,手工安装,下载安装包安装包下载┌──[[email protected]]-[~/awx]└─$https://github.com/kubernetes-sigs/kustomize/releases/download/kus......
  • springboot如何处理矩阵参数类型的url
    矩阵参数类型的url如何处理首先要开启这个功能在webconfig类中创建Webconfigurer类并且设置urlPathHelper类中的removeSemicolonContent为false@BeanpublicWe......
  • Linux apache服务实现URL重定向配置
    URL重定向,  即将httpd请求的URL转发至另一个的URL实现URL重定向的指令:Redirect[status]URL-pathURLstatus状态:permanent:返回永久重定向状态码301,此重定向......
  • SAP Spartacus 中的 HTTP URL parameters
    使用带有参数请求选项的HttpParams类在HttpRequest中添加URL查询字符串。下面的例子,searchHeroes()方法查询名字中包含搜索词的英雄。首先导入HttpParams类,如下......
  • 如何解析url
    bs_url="aHR0cHM6Ly9hY2NvdW50LnhpYW9taS5jb20v"url=base64.b64decode(bs_url).decode()print(url)#通过对参数的分析发现,_signuserhash参数为加密参数header......
  • PHP 中的CURL 模拟表单的post提交
    PHP中的CURL模拟表单的post提交废话不多说啦,直接上代码:<?php$data=['username'=>'乔峰','skill'=>'擒龙手'];$headers=array('Content-Type:application/x-www-form-......
  • 远程桌面连接工具Microsoft Remote Desktop for Mac
    microsoftremotedesktopmac版,是一款运行在Mac平台上的微软远程桌面连接工具,配置连接时,允许您决定应使用的分辨率,颜色质量,全屏模式,是否要全屏启动会话,是否使用所有监视器......
  • docker desktop url protocl 技术以及使用
    dockerdesktop在登录的使用使用了自定义的url协议,同时基于web进行系统登录,认证完成之后会生成code,之后通过url协议进入使用docker协议定义 <arra......
  • 在HTML网页中巧用URL
    首先,先放出一个地址给大家测试​​http://cnbruce.com/test/htmlpro/?name=cnbruce&[email protected]​​1,时下流行的(可能是吧,因为最近问的人比......