Compare commits
1 Commits
master
...
drone-publ
Author | SHA1 | Date | |
---|---|---|---|
da8ff84fd3 |
51
.drone.yml
51
.drone.yml
@ -6,12 +6,63 @@ steps:
|
||||
- name: check
|
||||
image: iamthefij/drone-pre-commit:personal
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: publish
|
||||
|
||||
depends_on:
|
||||
- test
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
- tag
|
||||
refs:
|
||||
- refs/heads/master
|
||||
- refs/tags/v*
|
||||
|
||||
steps:
|
||||
- name: submodules
|
||||
image: alpine/git
|
||||
commands:
|
||||
- git submodule init
|
||||
- git submodule update --recursive --remote
|
||||
|
||||
- name: build
|
||||
image: golang:1.15
|
||||
commands:
|
||||
- apt-get update
|
||||
- apt-get install -y --no-install-recommends libpcsclite-dev
|
||||
# Download and install mage
|
||||
- (cd $GOPATH && go get -u -d github.com/magefile/mage)
|
||||
- (cd $GOPATH/src/github.com/magefile/mage && go run bootstrap.go)
|
||||
# Build distribution bundle
|
||||
- ./mage_fake_env.sh dist
|
||||
|
||||
- name: gitea release
|
||||
image: plugins/gitea-release
|
||||
settings:
|
||||
title: ${DRONE_TAG}
|
||||
files: dist/*
|
||||
checksum:
|
||||
- md5
|
||||
- sha1
|
||||
- sha256
|
||||
- sha512
|
||||
base_url:
|
||||
from_secret: gitea_base_url
|
||||
api_key:
|
||||
from_secret: gitea_token
|
||||
when:
|
||||
event: tag
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: notify
|
||||
|
||||
depends_on:
|
||||
- test
|
||||
- publish
|
||||
|
||||
trigger:
|
||||
status:
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -74,3 +74,5 @@ src/vendor/
|
||||
src/libusb-1.0.dylib
|
||||
*.pyc
|
||||
venv
|
||||
static-builder
|
||||
fake_alfred_home/
|
||||
|
@ -1,13 +1,16 @@
|
||||
---
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.4.0
|
||||
rev: v3.3.0
|
||||
hooks:
|
||||
- id: check-added-large-files
|
||||
- id: trailing-whitespace
|
||||
- id: end-of-file-fixer
|
||||
- id: check-merge-conflict
|
||||
- repo: https://github.com/golangci/golangci-lint
|
||||
rev: v1.52.2
|
||||
- repo: git://github.com/dnephin/pre-commit-golang
|
||||
rev: v0.3.5
|
||||
hooks:
|
||||
- id: golangci-lint
|
||||
- id: go-fmt
|
||||
- id: go-imports
|
||||
# - id: gometalinter
|
||||
# - id: golangci-lint
|
||||
|
20
go.mod
20
go.mod
@ -1,27 +1,13 @@
|
||||
module git.iamthefij.com/iamthefij/alfred-yubico-auth
|
||||
|
||||
go 1.20
|
||||
go 1.15
|
||||
|
||||
// Right now requires https://github.com/vividboarder/ykoath branch: validate
|
||||
replace github.com/yawn/ykoath => ./ykoath
|
||||
|
||||
// Right now requires https://github.com/iamthefij/awgo branch: alfred-5
|
||||
replace github.com/deanishe/awgo => github.com/iamthefij/awgo v0.29.1-pre1
|
||||
|
||||
require (
|
||||
git.iamthefij.com/iamthefij/slog v1.0.0
|
||||
github.com/deanishe/awgo v0.29.1
|
||||
github.com/magefile/mage v1.14.0
|
||||
github.com/deanishe/awgo v0.27.1
|
||||
github.com/magefile/mage v1.10.0
|
||||
github.com/yawn/ykoath v1.0.4
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/bmatcuk/doublestar v1.3.4 // indirect
|
||||
github.com/ebfe/scard v0.0.0-20190212122703-c3d1b1916a95 // indirect
|
||||
github.com/pkg/errors v0.8.1 // indirect
|
||||
go.deanishe.net/env v0.5.1 // indirect
|
||||
go.deanishe.net/fuzzy v1.0.0 // indirect
|
||||
golang.org/x/crypto v0.0.0-20201208171446-5f87f3452ae9 // indirect
|
||||
golang.org/x/text v0.8.0 // indirect
|
||||
howett.net/plist v0.0.0-20201203080718-1454fab16a06 // indirect
|
||||
)
|
||||
|
38
go.sum
38
go.sum
@ -1,24 +1,28 @@
|
||||
git.iamthefij.com/iamthefij/slog v1.0.0 h1:S+njoK+dr5VUYSopISHm2QMq3IwrHfwmi/CrAmhXVbg=
|
||||
git.iamthefij.com/iamthefij/slog v1.0.0/go.mod h1:1RUj4hcCompZkAxXCRfUX786tb3cM/Zpkn97dGfUfbg=
|
||||
github.com/bmatcuk/doublestar v1.3.4 h1:gPypJ5xD31uhX6Tf54sDPUOBXTqKH4c9aPY66CyQrS0=
|
||||
github.com/bmatcuk/doublestar v1.3.4/go.mod h1:wiQtGV+rzVYxB7WIlirSN++5HPtPlXEo9MEoZQC/PmE=
|
||||
github.com/bmatcuk/doublestar v1.3.1 h1:rT8rxDPsavp9G+4ZULzqhhUSaI/OPsTZNG88Z3i0xvY=
|
||||
github.com/bmatcuk/doublestar v1.3.1/go.mod h1:wiQtGV+rzVYxB7WIlirSN++5HPtPlXEo9MEoZQC/PmE=
|
||||
github.com/creack/pty v1.1.9 h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/deanishe/awgo v0.27.1 h1:Vf8v7yaGWN3fibT+db1Mfw95Q/rD/1Qbf4ahGa4tMSY=
|
||||
github.com/deanishe/awgo v0.27.1/go.mod h1:Qen3509y1/sj7a5syefWc6FQHO1LE/tyoTyN9jRv1vU=
|
||||
github.com/ebfe/scard v0.0.0-20190212122703-c3d1b1916a95 h1:OM0MnUcXBysj7ZtXvThVWHMoahuKQ8FuwIdeSLcNdP4=
|
||||
github.com/ebfe/scard v0.0.0-20190212122703-c3d1b1916a95/go.mod h1:8hHvF8DlEq5kE3KWOsZQezdWq1OTOVxZArZMscS954E=
|
||||
github.com/iamthefij/awgo v0.29.1-pre1 h1:QrkVt0y3axBJl4tfdwHrsWXbDN7lsJKHNpqtp2WJOiA=
|
||||
github.com/iamthefij/awgo v0.29.1-pre1/go.mod h1:1yGF+uQfWXX99TiDfAYYKjJpHTq5lHEmvHFEVCHo6KA=
|
||||
github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA=
|
||||
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
|
||||
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/magefile/mage v1.10.0 h1:3HiXzCUY12kh9bIuyXShaVe529fJfyqoVM42o/uom2g=
|
||||
github.com/magefile/mage v1.10.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
|
||||
github.com/magefile/mage v1.11.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
|
||||
github.com/magefile/mage v1.14.0 h1:6QDX3g6z1YvJ4olPhT1wksUcSa/V0a1B+pJb73fBjyo=
|
||||
github.com/magefile/mage v1.14.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
|
||||
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
@ -29,9 +33,8 @@ github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A=
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
|
||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
go.deanishe.net/env v0.5.1 h1:WiOncK5uJj8Um57Vj2dc1bq1lMN7fgRag9up7I3LZy0=
|
||||
go.deanishe.net/env v0.5.1/go.mod h1:ihEYfDm0K0hq3f5ACTCQDrMTWxH9fTiA1lh1i0aMqm0=
|
||||
go.deanishe.net/fuzzy v1.0.0 h1:3Qp6PCX0DLb9z03b5OHwAGsbRSkgJpSLncsiDdXDt4Y=
|
||||
@ -39,23 +42,26 @@ go.deanishe.net/fuzzy v1.0.0/go.mod h1:2yEEMfG7jWgT1s5EO0TteVWmx2MXFBRMr5cMm84bQ
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20201208171446-5f87f3452ae9 h1:sYNJzB4J8toYPQTM6pAkcmBRgw9SnQKP9oXCHfgy604=
|
||||
golang.org/x/crypto v0.0.0-20201208171446-5f87f3452ae9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037 h1:YyJpGZS1sBuBCzLAR1VEpK193GlqGZbnPFnPV/5Rsb4=
|
||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221 h1:/ZHdbVpdR/jk3g30/d4yUL0JU9kksj8+F/bnQUVLGDM=
|
||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
|
||||
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e h1:FDhOuMEY4JVRztM/gsbk+IKUQ8kj74bxZrgw87eMMVc=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
howett.net/plist v0.0.0-20201203080718-1454fab16a06 h1:QDxUo/w2COstK1wIBYpzQlHX/NqaQTcf9jyz347nI58=
|
||||
howett.net/plist v0.0.0-20201203080718-1454fab16a06/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0=
|
||||
howett.net/plist v0.0.0-20200419221736-3b63eb3a43b5 h1:AQkaJpH+/FmqRjmXZPELom5zIERYZfwTjnHpfoVMQEc=
|
||||
howett.net/plist v0.0.0-20200419221736-3b63eb3a43b5/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0=
|
||||
|
615
info.plist
615
info.plist
@ -6,34 +6,18 @@
|
||||
<string>com.iamthefij.alfred-yubico-auth</string>
|
||||
<key>connections</key>
|
||||
<dict>
|
||||
<key>0149DE47-0232-434D-BB9E-B2C0B419A2E3</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>destinationuid</key>
|
||||
<string>55DFD4B6-922A-4259-8625-EC14889FBACD</string>
|
||||
<key>modifiers</key>
|
||||
<integer>0</integer>
|
||||
<key>modifiersubtext</key>
|
||||
<string></string>
|
||||
<key>vitoclose</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</array>
|
||||
<key>27BC434A-1663-44A7-85AF-C4AC6E1BEFB7</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>destinationuid</key>
|
||||
<string>2D69982A-0DB6-4ABA-812F-C7F2A73650AE</string>
|
||||
<key>modifiers</key>
|
||||
<integer>0</integer>
|
||||
<key>modifiersubtext</key>
|
||||
<string></string>
|
||||
<key>vitoclose</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</array>
|
||||
<key>2D69982A-0DB6-4ABA-812F-C7F2A73650AE</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>destinationuid</key>
|
||||
<string>9F48DDE6-BBE7-42ED-ABE5-C9255C92F1CD</string>
|
||||
<key>modifiers</key>
|
||||
<integer>0</integer>
|
||||
<key>modifiersubtext</key>
|
||||
<string></string>
|
||||
<key>vitoclose</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>destinationuid</key>
|
||||
<string>A8D2CCAC-5CA4-495E-BB62-5C7F596FA157</string>
|
||||
@ -46,51 +30,16 @@
|
||||
<key>vitoclose</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>destinationuid</key>
|
||||
<string>0149DE47-0232-434D-BB9E-B2C0B419A2E3</string>
|
||||
<key>modifiers</key>
|
||||
<integer>0</integer>
|
||||
<key>modifiersubtext</key>
|
||||
<string></string>
|
||||
<key>vitoclose</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</array>
|
||||
<key>55DFD4B6-922A-4259-8625-EC14889FBACD</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>destinationuid</key>
|
||||
<string>AD82ED59-033E-4860-B371-8128574E2FBC</string>
|
||||
<key>modifiers</key>
|
||||
<integer>0</integer>
|
||||
<key>modifiersubtext</key>
|
||||
<string></string>
|
||||
<key>sourceoutputuid</key>
|
||||
<string>94F60406-01FF-4991-A697-2C83147293EB</string>
|
||||
<key>vitoclose</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>destinationuid</key>
|
||||
<string>506787F2-9A61-492C-8C49-30EE04FB70BC</string>
|
||||
<key>modifiers</key>
|
||||
<integer>0</integer>
|
||||
<key>modifiersubtext</key>
|
||||
<string></string>
|
||||
<key>vitoclose</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</array>
|
||||
<key>8486DCAA-AFB7-407D-A0E9-E57E09997B24</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>destinationuid</key>
|
||||
<string>DB934647-74DE-4182-ACDF-93C629AA99D9</string>
|
||||
<string>FB0DDF80-FF90-439A-BF3F-6EC58C2AA870</string>
|
||||
<key>modifiers</key>
|
||||
<integer>524288</integer>
|
||||
<integer>1048576</integer>
|
||||
<key>modifiersubtext</key>
|
||||
<string>Show</string>
|
||||
<string>Paste token</string>
|
||||
<key>vitoclose</key>
|
||||
<false/>
|
||||
</dict>
|
||||
@ -104,16 +53,6 @@
|
||||
<key>vitoclose</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>destinationuid</key>
|
||||
<string>27BC434A-1663-44A7-85AF-C4AC6E1BEFB7</string>
|
||||
<key>modifiers</key>
|
||||
<integer>1048576</integer>
|
||||
<key>modifiersubtext</key>
|
||||
<string>Paste code</string>
|
||||
<key>vitoclose</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</array>
|
||||
<key>9F48DDE6-BBE7-42ED-ABE5-C9255C92F1CD</key>
|
||||
<array>
|
||||
@ -132,44 +71,7 @@
|
||||
<array>
|
||||
<dict>
|
||||
<key>destinationuid</key>
|
||||
<string>DA99BA2E-7234-491D-BD0F-044151FA98E2</string>
|
||||
<key>modifiers</key>
|
||||
<integer>0</integer>
|
||||
<key>modifiersubtext</key>
|
||||
<string></string>
|
||||
<key>vitoclose</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</array>
|
||||
<key>AD82ED59-033E-4860-B371-8128574E2FBC</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>destinationuid</key>
|
||||
<string>F3AEDAF9-44BC-4E39-B908-724974ACA17B</string>
|
||||
<key>modifiers</key>
|
||||
<integer>0</integer>
|
||||
<key>modifiersubtext</key>
|
||||
<string></string>
|
||||
<key>sourceoutputuid</key>
|
||||
<string>7B2EFCB5-ED69-4B10-84C5-4F6320C91491</string>
|
||||
<key>vitoclose</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>destinationuid</key>
|
||||
<string>FB0DDF80-FF90-439A-BF3F-6EC58C2AA870</string>
|
||||
<key>modifiers</key>
|
||||
<integer>0</integer>
|
||||
<key>modifiersubtext</key>
|
||||
<string></string>
|
||||
<key>sourceoutputuid</key>
|
||||
<string>94F60406-01FF-4991-A697-2C83147293EB</string>
|
||||
<key>vitoclose</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>destinationuid</key>
|
||||
<string>9F48DDE6-BBE7-42ED-ABE5-C9255C92F1CD</string>
|
||||
<string>C252A5EC-1AEE-4EF4-864F-67483EAADCFA</string>
|
||||
<key>modifiers</key>
|
||||
<integer>0</integer>
|
||||
<key>modifiersubtext</key>
|
||||
@ -204,44 +106,6 @@
|
||||
<false/>
|
||||
</dict>
|
||||
</array>
|
||||
<key>DA99BA2E-7234-491D-BD0F-044151FA98E2</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>destinationuid</key>
|
||||
<string>C252A5EC-1AEE-4EF4-864F-67483EAADCFA</string>
|
||||
<key>modifiers</key>
|
||||
<integer>0</integer>
|
||||
<key>modifiersubtext</key>
|
||||
<string></string>
|
||||
<key>sourceoutputuid</key>
|
||||
<string>94F60406-01FF-4991-A697-2C83147293EB</string>
|
||||
<key>vitoclose</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>destinationuid</key>
|
||||
<string>506787F2-9A61-492C-8C49-30EE04FB70BC</string>
|
||||
<key>modifiers</key>
|
||||
<integer>0</integer>
|
||||
<key>modifiersubtext</key>
|
||||
<string></string>
|
||||
<key>vitoclose</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</array>
|
||||
<key>DB934647-74DE-4182-ACDF-93C629AA99D9</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>destinationuid</key>
|
||||
<string>2D69982A-0DB6-4ABA-812F-C7F2A73650AE</string>
|
||||
<key>modifiers</key>
|
||||
<integer>0</integer>
|
||||
<key>modifiersubtext</key>
|
||||
<string></string>
|
||||
<key>vitoclose</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</array>
|
||||
<key>E86DC7C1-35C1-4BA9-8B33-A95DE7082F7E</key>
|
||||
<array>
|
||||
<dict>
|
||||
@ -282,66 +146,21 @@
|
||||
<dict>
|
||||
<key>config</key>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<key>autopaste</key>
|
||||
<true/>
|
||||
<key>clipboardtext</key>
|
||||
<string>{query}</string>
|
||||
<key>passthroughargument</key>
|
||||
<key>ignoredynamicplaceholders</key>
|
||||
<false/>
|
||||
<key>variables</key>
|
||||
<dict>
|
||||
<key>result_action</key>
|
||||
<string>show</string>
|
||||
</dict>
|
||||
<key>transient</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>type</key>
|
||||
<string>alfred.workflow.utility.argument</string>
|
||||
<string>alfred.workflow.output.clipboard</string>
|
||||
<key>uid</key>
|
||||
<string>DB934647-74DE-4182-ACDF-93C629AA99D9</string>
|
||||
<string>FB0DDF80-FF90-439A-BF3F-6EC58C2AA870</string>
|
||||
<key>version</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>config</key>
|
||||
<dict>
|
||||
<key>lastpathcomponent</key>
|
||||
<false/>
|
||||
<key>onlyshowifquerypopulated</key>
|
||||
<false/>
|
||||
<key>removeextension</key>
|
||||
<false/>
|
||||
<key>text</key>
|
||||
<string>Password key is now stored in your keychain</string>
|
||||
<key>title</key>
|
||||
<string>Password saved</string>
|
||||
</dict>
|
||||
<key>type</key>
|
||||
<string>alfred.workflow.output.notification</string>
|
||||
<key>uid</key>
|
||||
<string>C252A5EC-1AEE-4EF4-864F-67483EAADCFA</string>
|
||||
<key>version</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>config</key>
|
||||
<dict>
|
||||
<key>concurrently</key>
|
||||
<false/>
|
||||
<key>escaping</key>
|
||||
<integer>102</integer>
|
||||
<key>script</key>
|
||||
<string>./alfred-yubico-auth -run-script set-password</string>
|
||||
<key>scriptargtype</key>
|
||||
<integer>1</integer>
|
||||
<key>scriptfile</key>
|
||||
<string></string>
|
||||
<key>type</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>type</key>
|
||||
<string>alfred.workflow.action.script</string>
|
||||
<key>uid</key>
|
||||
<string>A8D2CCAC-5CA4-495E-BB62-5C7F596FA157</string>
|
||||
<key>version</key>
|
||||
<integer>2</integer>
|
||||
<integer>3</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>config</key>
|
||||
@ -371,7 +190,7 @@
|
||||
<key>runningsubtext</key>
|
||||
<string></string>
|
||||
<key>script</key>
|
||||
<string>./alfred-yubico-auth list</string>
|
||||
<string>./alfred-yubico-auth</string>
|
||||
<key>scriptargtype</key>
|
||||
<integer>1</integer>
|
||||
<key>scriptfile</key>
|
||||
@ -392,115 +211,6 @@
|
||||
<key>version</key>
|
||||
<integer>3</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>config</key>
|
||||
<dict>
|
||||
<key>conditions</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>inputstring</key>
|
||||
<string>{var:result}</string>
|
||||
<key>matchcasesensitive</key>
|
||||
<false/>
|
||||
<key>matchmode</key>
|
||||
<integer>0</integer>
|
||||
<key>matchstring</key>
|
||||
<string>success</string>
|
||||
<key>outputlabel</key>
|
||||
<string>success</string>
|
||||
<key>uid</key>
|
||||
<string>94F60406-01FF-4991-A697-2C83147293EB</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>elselabel</key>
|
||||
<string>else</string>
|
||||
</dict>
|
||||
<key>type</key>
|
||||
<string>alfred.workflow.utility.conditional</string>
|
||||
<key>uid</key>
|
||||
<string>DA99BA2E-7234-491D-BD0F-044151FA98E2</string>
|
||||
<key>version</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>config</key>
|
||||
<dict>
|
||||
<key>conditions</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>inputstring</key>
|
||||
<string>{var:action}</string>
|
||||
<key>matchcasesensitive</key>
|
||||
<false/>
|
||||
<key>matchmode</key>
|
||||
<integer>0</integer>
|
||||
<key>matchstring</key>
|
||||
<string>set-password</string>
|
||||
<key>outputlabel</key>
|
||||
<string>Set password</string>
|
||||
<key>uid</key>
|
||||
<string>94F60406-01FF-4991-A697-2C83147293EB</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>elselabel</key>
|
||||
<string>else</string>
|
||||
</dict>
|
||||
<key>type</key>
|
||||
<string>alfred.workflow.utility.conditional</string>
|
||||
<key>uid</key>
|
||||
<string>2D69982A-0DB6-4ABA-812F-C7F2A73650AE</string>
|
||||
<key>version</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>config</key>
|
||||
<dict>
|
||||
<key>argument</key>
|
||||
<string>{query}</string>
|
||||
<key>passthroughargument</key>
|
||||
<false/>
|
||||
<key>variables</key>
|
||||
<dict>
|
||||
<key>result_action</key>
|
||||
<string>paste</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>type</key>
|
||||
<string>alfred.workflow.utility.argument</string>
|
||||
<key>uid</key>
|
||||
<string>27BC434A-1663-44A7-85AF-C4AC6E1BEFB7</string>
|
||||
<key>version</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>config</key>
|
||||
<dict>
|
||||
<key>alignment</key>
|
||||
<integer>0</integer>
|
||||
<key>backgroundcolor</key>
|
||||
<string></string>
|
||||
<key>fadespeed</key>
|
||||
<integer>0</integer>
|
||||
<key>fillmode</key>
|
||||
<integer>0</integer>
|
||||
<key>font</key>
|
||||
<string></string>
|
||||
<key>ignoredynamicplaceholders</key>
|
||||
<false/>
|
||||
<key>largetypetext</key>
|
||||
<string>{query}</string>
|
||||
<key>textcolor</key>
|
||||
<string></string>
|
||||
<key>wrapat</key>
|
||||
<integer>50</integer>
|
||||
</dict>
|
||||
<key>type</key>
|
||||
<string>alfred.workflow.output.largetype</string>
|
||||
<key>uid</key>
|
||||
<string>F3AEDAF9-44BC-4E39-B908-724974ACA17B</string>
|
||||
<key>version</key>
|
||||
<integer>3</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>config</key>
|
||||
<dict>
|
||||
@ -522,69 +232,6 @@
|
||||
<key>version</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>config</key>
|
||||
<dict>
|
||||
<key>conditions</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>inputstring</key>
|
||||
<string>{var:result_action}</string>
|
||||
<key>matchcasesensitive</key>
|
||||
<false/>
|
||||
<key>matchmode</key>
|
||||
<integer>0</integer>
|
||||
<key>matchstring</key>
|
||||
<string>show</string>
|
||||
<key>outputlabel</key>
|
||||
<string>show</string>
|
||||
<key>uid</key>
|
||||
<string>7B2EFCB5-ED69-4B10-84C5-4F6320C91491</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>inputstring</key>
|
||||
<string>{var:result_action}</string>
|
||||
<key>matchcasesensitive</key>
|
||||
<false/>
|
||||
<key>matchmode</key>
|
||||
<integer>0</integer>
|
||||
<key>matchstring</key>
|
||||
<string>paste</string>
|
||||
<key>outputlabel</key>
|
||||
<string>paste</string>
|
||||
<key>uid</key>
|
||||
<string>94F60406-01FF-4991-A697-2C83147293EB</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>elselabel</key>
|
||||
<string>copy</string>
|
||||
</dict>
|
||||
<key>type</key>
|
||||
<string>alfred.workflow.utility.conditional</string>
|
||||
<key>uid</key>
|
||||
<string>AD82ED59-033E-4860-B371-8128574E2FBC</string>
|
||||
<key>version</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>config</key>
|
||||
<dict>
|
||||
<key>autopaste</key>
|
||||
<true/>
|
||||
<key>clipboardtext</key>
|
||||
<string>{query}</string>
|
||||
<key>ignoredynamicplaceholders</key>
|
||||
<false/>
|
||||
<key>transient</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>type</key>
|
||||
<string>alfred.workflow.output.clipboard</string>
|
||||
<key>uid</key>
|
||||
<string>FB0DDF80-FF90-439A-BF3F-6EC58C2AA870</string>
|
||||
<key>version</key>
|
||||
<integer>3</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>config</key>
|
||||
<dict>
|
||||
@ -604,31 +251,6 @@
|
||||
<key>version</key>
|
||||
<integer>3</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>config</key>
|
||||
<dict>
|
||||
<key>concurrently</key>
|
||||
<false/>
|
||||
<key>escaping</key>
|
||||
<integer>102</integer>
|
||||
<key>script</key>
|
||||
<string>query=$1
|
||||
|
||||
./alfred-yubico-auth -run-script "$query"</string>
|
||||
<key>scriptargtype</key>
|
||||
<integer>1</integer>
|
||||
<key>scriptfile</key>
|
||||
<string></string>
|
||||
<key>type</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>type</key>
|
||||
<string>alfred.workflow.action.script</string>
|
||||
<key>uid</key>
|
||||
<string>0149DE47-0232-434D-BB9E-B2C0B419A2E3</string>
|
||||
<key>version</key>
|
||||
<integer>2</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>config</key>
|
||||
<dict>
|
||||
@ -642,36 +264,6 @@
|
||||
<key>version</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>config</key>
|
||||
<dict>
|
||||
<key>conditions</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>inputstring</key>
|
||||
<string>{var:result}</string>
|
||||
<key>matchcasesensitive</key>
|
||||
<false/>
|
||||
<key>matchmode</key>
|
||||
<integer>0</integer>
|
||||
<key>matchstring</key>
|
||||
<string>success</string>
|
||||
<key>outputlabel</key>
|
||||
<string>success</string>
|
||||
<key>uid</key>
|
||||
<string>94F60406-01FF-4991-A697-2C83147293EB</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>elselabel</key>
|
||||
<string>else</string>
|
||||
</dict>
|
||||
<key>type</key>
|
||||
<string>alfred.workflow.utility.conditional</string>
|
||||
<key>uid</key>
|
||||
<string>55DFD4B6-922A-4259-8625-EC14889FBACD</string>
|
||||
<key>version</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>config</key>
|
||||
<dict>
|
||||
@ -712,24 +304,77 @@
|
||||
<key>version</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>config</key>
|
||||
<dict>
|
||||
<key>conditions</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>inputstring</key>
|
||||
<string>{var:action}</string>
|
||||
<key>matchcasesensitive</key>
|
||||
<false/>
|
||||
<key>matchmode</key>
|
||||
<integer>0</integer>
|
||||
<key>matchstring</key>
|
||||
<string>set-password</string>
|
||||
<key>outputlabel</key>
|
||||
<string>Set password</string>
|
||||
<key>uid</key>
|
||||
<string>94F60406-01FF-4991-A697-2C83147293EB</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>elselabel</key>
|
||||
<string>else</string>
|
||||
</dict>
|
||||
<key>type</key>
|
||||
<string>alfred.workflow.utility.conditional</string>
|
||||
<key>uid</key>
|
||||
<string>2D69982A-0DB6-4ABA-812F-C7F2A73650AE</string>
|
||||
<key>version</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>config</key>
|
||||
<dict>
|
||||
<key>concurrently</key>
|
||||
<false/>
|
||||
<key>escaping</key>
|
||||
<integer>102</integer>
|
||||
<key>script</key>
|
||||
<string>./alfred-yubico-auth set-password</string>
|
||||
<key>scriptargtype</key>
|
||||
<integer>1</integer>
|
||||
<key>scriptfile</key>
|
||||
<string></string>
|
||||
<key>type</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>type</key>
|
||||
<string>alfred.workflow.action.script</string>
|
||||
<key>uid</key>
|
||||
<string>A8D2CCAC-5CA4-495E-BB62-5C7F596FA157</string>
|
||||
<key>version</key>
|
||||
<integer>2</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>config</key>
|
||||
<dict>
|
||||
<key>lastpathcomponent</key>
|
||||
<false/>
|
||||
<key>onlyshowifquerypopulated</key>
|
||||
<true/>
|
||||
<false/>
|
||||
<key>removeextension</key>
|
||||
<false/>
|
||||
<key>text</key>
|
||||
<string>{query}</string>
|
||||
<string>Password key is now stored in your keychain</string>
|
||||
<key>title</key>
|
||||
<string>Alfred Yubikey Error</string>
|
||||
<string>Password saved</string>
|
||||
</dict>
|
||||
<key>type</key>
|
||||
<string>alfred.workflow.output.notification</string>
|
||||
<key>uid</key>
|
||||
<string>506787F2-9A61-492C-8C49-30EE04FB70BC</string>
|
||||
<string>C252A5EC-1AEE-4EF4-864F-67483EAADCFA</string>
|
||||
<key>version</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
@ -738,135 +383,79 @@
|
||||
<string></string>
|
||||
<key>uidata</key>
|
||||
<dict>
|
||||
<key>0149DE47-0232-434D-BB9E-B2C0B419A2E3</key>
|
||||
<dict>
|
||||
<key>xpos</key>
|
||||
<integer>180</integer>
|
||||
<key>ypos</key>
|
||||
<integer>305</integer>
|
||||
</dict>
|
||||
<key>0718204D-3398-4AEF-A621-DDDE1FC6ED75</key>
|
||||
<dict>
|
||||
<key>xpos</key>
|
||||
<integer>1245</integer>
|
||||
<integer>990</integer>
|
||||
<key>ypos</key>
|
||||
<integer>225</integer>
|
||||
</dict>
|
||||
<key>27BC434A-1663-44A7-85AF-C4AC6E1BEFB7</key>
|
||||
<dict>
|
||||
<key>xpos</key>
|
||||
<integer>260</integer>
|
||||
<key>ypos</key>
|
||||
<integer>155</integer>
|
||||
<integer>145</integer>
|
||||
</dict>
|
||||
<key>2D69982A-0DB6-4ABA-812F-C7F2A73650AE</key>
|
||||
<dict>
|
||||
<key>xpos</key>
|
||||
<integer>365</integer>
|
||||
<integer>270</integer>
|
||||
<key>ypos</key>
|
||||
<integer>90</integer>
|
||||
</dict>
|
||||
<key>506787F2-9A61-492C-8C49-30EE04FB70BC</key>
|
||||
<dict>
|
||||
<key>xpos</key>
|
||||
<integer>835</integer>
|
||||
<key>ypos</key>
|
||||
<integer>540</integer>
|
||||
</dict>
|
||||
<key>55DFD4B6-922A-4259-8625-EC14889FBACD</key>
|
||||
<dict>
|
||||
<key>xpos</key>
|
||||
<integer>365</integer>
|
||||
<key>ypos</key>
|
||||
<integer>330</integer>
|
||||
<integer>245</integer>
|
||||
</dict>
|
||||
<key>8486DCAA-AFB7-407D-A0E9-E57E09997B24</key>
|
||||
<dict>
|
||||
<key>xpos</key>
|
||||
<integer>70</integer>
|
||||
<integer>120</integer>
|
||||
<key>ypos</key>
|
||||
<integer>65</integer>
|
||||
<integer>140</integer>
|
||||
</dict>
|
||||
<key>9F48DDE6-BBE7-42ED-ABE5-C9255C92F1CD</key>
|
||||
<dict>
|
||||
<key>xpos</key>
|
||||
<integer>650</integer>
|
||||
<key>ypos</key>
|
||||
<integer>415</integer>
|
||||
<key>ypos</key>
|
||||
<integer>235</integer>
|
||||
</dict>
|
||||
<key>A8D2CCAC-5CA4-495E-BB62-5C7F596FA157</key>
|
||||
<dict>
|
||||
<key>xpos</key>
|
||||
<integer>515</integer>
|
||||
<integer>390</integer>
|
||||
<key>ypos</key>
|
||||
<integer>55</integer>
|
||||
</dict>
|
||||
<key>AD82ED59-033E-4860-B371-8128574E2FBC</key>
|
||||
<dict>
|
||||
<key>xpos</key>
|
||||
<integer>485</integer>
|
||||
<key>ypos</key>
|
||||
<integer>285</integer>
|
||||
<integer>415</integer>
|
||||
</dict>
|
||||
<key>BFB3A122-52BB-4FF1-B5B3-CECD42A730DB</key>
|
||||
<dict>
|
||||
<key>xpos</key>
|
||||
<integer>1100</integer>
|
||||
<integer>810</integer>
|
||||
<key>ypos</key>
|
||||
<integer>300</integer>
|
||||
<integer>145</integer>
|
||||
</dict>
|
||||
<key>C252A5EC-1AEE-4EF4-864F-67483EAADCFA</key>
|
||||
<dict>
|
||||
<key>xpos</key>
|
||||
<integer>800</integer>
|
||||
<integer>595</integer>
|
||||
<key>ypos</key>
|
||||
<integer>45</integer>
|
||||
<integer>420</integer>
|
||||
</dict>
|
||||
<key>DA3E9CE8-7C4F-4B09-BFA5-F8CA83297968</key>
|
||||
<dict>
|
||||
<key>xpos</key>
|
||||
<integer>835</integer>
|
||||
<integer>590</integer>
|
||||
<key>ypos</key>
|
||||
<integer>415</integer>
|
||||
</dict>
|
||||
<key>DA99BA2E-7234-491D-BD0F-044151FA98E2</key>
|
||||
<dict>
|
||||
<key>xpos</key>
|
||||
<integer>670</integer>
|
||||
<key>ypos</key>
|
||||
<integer>75</integer>
|
||||
</dict>
|
||||
<key>DB934647-74DE-4182-ACDF-93C629AA99D9</key>
|
||||
<dict>
|
||||
<key>xpos</key>
|
||||
<integer>260</integer>
|
||||
<key>ypos</key>
|
||||
<integer>40</integer>
|
||||
<integer>235</integer>
|
||||
</dict>
|
||||
<key>E86DC7C1-35C1-4BA9-8B33-A95DE7082F7E</key>
|
||||
<dict>
|
||||
<key>xpos</key>
|
||||
<integer>1015</integer>
|
||||
<integer>730</integer>
|
||||
<key>ypos</key>
|
||||
<integer>330</integer>
|
||||
</dict>
|
||||
<key>F3AEDAF9-44BC-4E39-B908-724974ACA17B</key>
|
||||
<dict>
|
||||
<key>xpos</key>
|
||||
<integer>655</integer>
|
||||
<key>ypos</key>
|
||||
<integer>160</integer>
|
||||
<integer>175</integer>
|
||||
</dict>
|
||||
<key>FB0DDF80-FF90-439A-BF3F-6EC58C2AA870</key>
|
||||
<dict>
|
||||
<key>xpos</key>
|
||||
<integer>650</integer>
|
||||
<integer>455</integer>
|
||||
<key>ypos</key>
|
||||
<integer>285</integer>
|
||||
<integer>60</integer>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>version</key>
|
||||
<string>1.1.1</string>
|
||||
<string>1.0.0</string>
|
||||
<key>webaddress</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
|
14
mage_fake_env.sh
Executable file
14
mage_fake_env.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Statically compile the builder
|
||||
mage -compile ./static-builder
|
||||
|
||||
# Change the environment to one that looks kinda like Alfred
|
||||
export HOME=fake_alfred_home
|
||||
alfred_sync_dir="$HOME/Library/Application Support/Alfred"
|
||||
mkdir -p "$alfred_sync_dir/Alfred.alfredpreferences/workflows"
|
||||
echo '{"syncfolders": {"4": "/dev/null"}, "current": "/dev/null"}' > "$alfred_sync_dir/prefs.json"
|
||||
# Run the builder with whatever arguments
|
||||
export GOOS=darwin
|
||||
export GOARCH=amd64
|
||||
./static-builder "$@"
|
27
magefile.go
27
magefile.go
@ -1,4 +1,4 @@
|
||||
//go:build mage
|
||||
// +build mage
|
||||
|
||||
package main
|
||||
|
||||
@ -13,31 +13,18 @@ import (
|
||||
"github.com/magefile/mage/sh"
|
||||
)
|
||||
|
||||
const (
|
||||
var (
|
||||
info *build.Info
|
||||
buildDir = "./build"
|
||||
distDir = "./dist"
|
||||
binName = "alfred-yubico-auth"
|
||||
)
|
||||
|
||||
var (
|
||||
info *build.Info
|
||||
|
||||
// Default mage target
|
||||
Default = Run
|
||||
|
||||
// Output binary path
|
||||
binPath = filepath.Join(buildDir, binName)
|
||||
)
|
||||
|
||||
func InfoWithVersion(v int) build.Option {
|
||||
return func(i *build.Info) {
|
||||
i.AlfredMajorVersion = v
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
var err error
|
||||
if info, err = build.NewInfo(InfoWithVersion(5)); err != nil {
|
||||
if info, err = build.NewInfo(); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
@ -47,7 +34,8 @@ func Build() error {
|
||||
mg.Deps(cleanBuild)
|
||||
fmt.Println("Building...")
|
||||
|
||||
if err := sh.RunWith(info.Env(), "go", "build", "-o", binPath, "."); err != nil {
|
||||
err := sh.RunWith(info.Env(), "go", "build", "-o", buildDir+"/alfred-yubico-auth", ".")
|
||||
if err != nil {
|
||||
return fmt.Errorf("error building binary %w", err)
|
||||
}
|
||||
|
||||
@ -67,13 +55,12 @@ func Run() error {
|
||||
mg.Deps(Build)
|
||||
fmt.Println("Running...")
|
||||
|
||||
return sh.RunWith(info.Env(), binPath)
|
||||
return sh.RunWith(info.Env(), buildDir+"/alfred-yubico-auth")
|
||||
}
|
||||
|
||||
// Dist packages workflow for distribution.
|
||||
func Dist() error {
|
||||
mg.SerialDeps(Clean, Build)
|
||||
fmt.Println("Exporting dist...")
|
||||
|
||||
p, err := build.Export(buildDir, distDir)
|
||||
if err != nil {
|
||||
|
116
main.go
116
main.go
@ -1,23 +1,20 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"flag"
|
||||
"fmt"
|
||||
|
||||
"git.iamthefij.com/iamthefij/slog"
|
||||
aw "github.com/deanishe/awgo"
|
||||
"github.com/deanishe/awgo/util"
|
||||
"github.com/yawn/ykoath"
|
||||
|
||||
"bytes"
|
||||
)
|
||||
|
||||
var (
|
||||
wf *aw.Workflow
|
||||
oath *ykoath.OATH
|
||||
keychainAccount = "yubico-auth-creds"
|
||||
|
||||
errIncorrectPassword = errors.New("incorrect password")
|
||||
)
|
||||
|
||||
func init() {
|
||||
@ -31,149 +28,102 @@ func main() {
|
||||
func promptPassword() (string, error) {
|
||||
out, err := util.Run("./password-prompt.js")
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("error reading password from prompt: %w", err)
|
||||
return "", err
|
||||
}
|
||||
|
||||
out = bytes.TrimRight(out, "\n")
|
||||
|
||||
return string(out), nil
|
||||
}
|
||||
|
||||
func setPassword(s *ykoath.Select) error {
|
||||
passphrase, err := promptPassword()
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed reading passphrase: %w", err)
|
||||
slog.Error("failed reading passphrase")
|
||||
return err
|
||||
}
|
||||
|
||||
err = validatePassphrase(s, passphrase)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed validating passphrase: %w", err)
|
||||
}
|
||||
|
||||
err = wf.Keychain.Set(keychainAccount, passphrase)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed storing passphrase in keychain: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func sendResult(result string, args ...string) error {
|
||||
results := aw.NewArgVars()
|
||||
|
||||
results.Arg(args...)
|
||||
results.Var("result", result)
|
||||
|
||||
return results.Send()
|
||||
}
|
||||
|
||||
func validatePassphrase(s *ykoath.Select, passphrase string) error {
|
||||
key := s.DeriveKey(passphrase)
|
||||
|
||||
// verify password is correct with a validate call
|
||||
ok, err := oath.Validate(s, key)
|
||||
// TODO: test key before storing
|
||||
err = wf.Keychain.Set(keychainAccount, string(key))
|
||||
if err != nil {
|
||||
return fmt.Errorf("error in validate: %w", err)
|
||||
slog.Error("failed storing passphrase key in keychain")
|
||||
return err
|
||||
}
|
||||
|
||||
if !ok {
|
||||
return errIncorrectPassword
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func run() {
|
||||
runScript := flag.Bool("run-script", false, "change output to script output")
|
||||
|
||||
wf.Args()
|
||||
flag.Parse()
|
||||
|
||||
if *runScript {
|
||||
wf.Configure(aw.TextErrors(true))
|
||||
}
|
||||
|
||||
var err error
|
||||
|
||||
oath, err = ykoath.New()
|
||||
if err != nil {
|
||||
wf.FatalError(fmt.Errorf("failed to iniatialize new oath: %w", err))
|
||||
slog.Error("failed to iniatialize new oath: %v", err)
|
||||
wf.FatalError(err)
|
||||
}
|
||||
|
||||
defer oath.Close()
|
||||
oath.Debug = slog.Debug
|
||||
|
||||
// Select oath to begin
|
||||
s, err := oath.Select()
|
||||
if err != nil {
|
||||
wf.FatalError(fmt.Errorf("failed to select oath: %w", err))
|
||||
slog.Error("failed to select oath: %v", err)
|
||||
wf.FatalError(err)
|
||||
}
|
||||
|
||||
// Check to see if we are trying to set a password
|
||||
if flag.Arg(0) == "set-password" {
|
||||
err = setPassword(s)
|
||||
if err != nil {
|
||||
wf.FatalError(fmt.Errorf("failed to set password: %w", err))
|
||||
wf.FatalError(err)
|
||||
}
|
||||
|
||||
if err = sendResult("success"); err != nil {
|
||||
wf.FatalError(fmt.Errorf("failed to send password set result: %w", err))
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// If required, authenticate with password from keychain
|
||||
if s.Challenge != nil {
|
||||
passphrase, err := wf.Keychain.Get(keychainAccount)
|
||||
key, err := wf.Keychain.Get(keychainAccount)
|
||||
if err != nil {
|
||||
slog.Error("no key found in keychain but password is required")
|
||||
wf.NewWarningItem("No password set", "↵ to set password").
|
||||
Var("action", "set-password").
|
||||
Valid(true)
|
||||
wf.SendFeedback()
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
err = validatePassphrase(s, passphrase)
|
||||
if err != nil {
|
||||
wf.FatalError(fmt.Errorf("passphrase failed: %w", err))
|
||||
ok, err := oath.Validate(s, []byte(key))
|
||||
slog.FatalOnErr(err, "validation failed")
|
||||
if !ok {
|
||||
panic("could not validate")
|
||||
}
|
||||
}
|
||||
|
||||
if flag.Arg(0) == "list" {
|
||||
// List names only
|
||||
names, err := oath.List()
|
||||
if err != nil {
|
||||
wf.FatalError(fmt.Errorf("failed to list names: %w", err))
|
||||
}
|
||||
|
||||
slog.FatalOnErr(err, "failed to list names")
|
||||
for _, name := range names {
|
||||
slog.Log(name.Name)
|
||||
wf.NewItem(name.Name).
|
||||
Icon(aw.IconAccount).
|
||||
Subtitle("Copy to clipboard").
|
||||
Arg(name.Name).
|
||||
Valid(true)
|
||||
}
|
||||
} else {
|
||||
name := flag.Arg(0)
|
||||
|
||||
code, err := oath.CalculateOne(name)
|
||||
// Default execution is to calculate all codes and return them in list
|
||||
creds, err := oath.CalculateAll()
|
||||
if err != nil {
|
||||
// TODO: Check for error "requires-auth" and notify touch
|
||||
wf.FatalError(fmt.Errorf("failed to generate code: %w", err))
|
||||
slog.Error("failed to calculate all")
|
||||
wf.FatalError(err)
|
||||
}
|
||||
|
||||
slog.Log(code)
|
||||
|
||||
if err = sendResult("success", code); err != nil {
|
||||
wf.FatalError(fmt.Errorf("failed to send code: %w", err))
|
||||
for cred, code := range creds {
|
||||
slog.Log(cred)
|
||||
wf.NewItem(cred).
|
||||
Icon(aw.IconAccount).
|
||||
Subtitle("Copy to clipboard").
|
||||
Arg(code).
|
||||
Copytext(code).
|
||||
Valid(true)
|
||||
}
|
||||
}
|
||||
|
||||
if !*runScript {
|
||||
wf.SendFeedback()
|
||||
}
|
||||
wf.SendFeedback()
|
||||
}
|
||||
|
2
ykoath
2
ykoath
@ -1 +1 @@
|
||||
Subproject commit fd081cb213d030585bfdd03305e03bff4d6e7a09
|
||||
Subproject commit 0bb0699e51d3672572cc7869397eeff871bdf45e
|
Loading…
Reference in New Issue
Block a user