Matt Baer
99e1973652
Merge pull request #48 from writeas/vendor-deps
Vendor dependencies for writeas-cli
hace 4 años
Christopher Davis
13c597643e
Vendor dependencies for writeas-cli
Use go modules to vendor the dependencies we need for the writeas-cli build.
hace 4 años
Matt Baer
62e03522f7
Merge pull request #43 from writeas/T692
Add password flag for authentication
Closes T692
hace 4 años
Matt Baer
d4e77b9b7e
Merge branch 'develop'
hace 4 años
Matt Baer
1c50cb773c
Link to WF v0.11 in wf-cli README
hace 4 años
Matt Baer
a04d8064cb
Remove Debian install instructions
This is unavailable at the moment.
hace 4 años
Christopher Davis
bd378a85ad
commands: Remove redundant string() cast on pass
When logging in we had a cast that was made redundant, since
`pass` is now a string.
hace 4 años
Christopher Davis
f2bb9f5896
commands: Fix up the interactive auth flow
Fixes up the interactive authorization workflow so that
pass is reassigned properly.
For T692
hace 4 años
Christopher Davis
c6af292b2a
Add password flag for authentication
For T692
hace 4 años
Matt Baer
f82016a3b2
Merge branch 'develop'
hace 4 años
Matt Baer
e8fb68311a
Fix wf-cli download links
hace 4 años
Matt Baer
c52a2970f8
Merge pull request #45 from writeas/develop
WriteFreely CLI v1.0
hace 4 años
Matt Baer
44a8f6e943
Fix README links
hace 4 años
Matt Baer
0e21d37a24
Remove common endings on wf/writeas READMEs
hace 4 años
Matt Baer
4d7494a1c3
Split up READMEs and GUIDEs
for writeas-cli and wf-cli.
hace 4 años
Matt Baer
f47d07b907
Merge branch 'develop' of github.com:writeas/writeas-cli into develop
hace 4 años
Matt Baer
ee239bb564
Merge pull request #44 from writeas/T672-accounts
add accounts command
Resolves T672
hace 4 años
Matt Baer
5b1ae2cd83
Merge branch 'T672-accounts' of github.com:writeas/writeas-cli into T672-accounts
hace 4 años
Matt Baer
c9f20e27f7
Have `accounts` print nothing when unauth'd
This replicates behavior elsewhere, where we don't output anything if
there is no information to show. Instead, the "no accounts" message will
only show if the user supplies a -v / --verbose flag.
hace 4 años
Matt Baer
7fde5dd91b
Clean up wf posts subcommand
- Remove description
- Fix usage (it only shows drafts)
- Remove --md flag (Markdown is always rendered on draft posts)
- Fix --verbose description
hace 4 años
Rob Loranger
139a14154b
add accounts command in wf
this adds a new sub command accounts, which will list all currently
authenticated user accounts grouped by hostname
hace 4 años
Matt Baer
5ac95a0c41
Tweak wf flag help messages
hace 4 años
Matt Baer
400b6fe14a
Remove wf claim command
This isn't needed / used in WriteFreely.
hace 4 años
Matt Baer
de2ec24c13
Merge pull request #36 from writeas/T586
Support any writefreely instance
Resolves T586 T594 T595 T635
hace 4 años
Rob Loranger
ff67ed2bb8
remove default collection of username
hace 4 años
Matt Baer
1123705eb7
Fix un-auth'd messages on various commands
hace 4 años
Rob Loranger
253d2e9782
add accounts command in wf
this adds a new sub command accounts, which will list all currently
authenticated user accounts grouped by hostname
hace 4 años
Rob Loranger
47d8bb3e6d
wf/post list: draft posts not anonymous
hace 4 años
Rob Loranger
05380e618f
fix post url for non standard hostnames
hace 4 años
Rob Loranger
b60ae1edc0
get tokens for update and delete
this changes DoUpdate and DoDelete to load the user and set the access
token in the client when no edit token is provided.
hace 4 años
Rob Loranger
024b7090ac
clean up CurrentUser global cfg logic
hace 4 años
Rob Loranger
83bc1cf310
fix hostname schema dir issues
hace 4 años
Rob Loranger
96f57d52e8
fix user auth for writeas posting
hace 4 años
Rob Loranger
86e9757c4b
set token on new client for api post
hace 4 años
Rob Loranger
284087a32f
remove println
hace 4 años
Rob Loranger
d8d41a9729
check for any logged in user when no flag passed
this adds a check for any logged in users on any host when neither the
user or host flag are passed and not default pair is configured
hace 4 años
Rob Loranger
6dbf4f98cd
command auth should use user flag
if the user flag is provided auth should attempt to authenticate with
that user.
hace 4 años
Rob Loranger
abc78c7652
CurrentUser should always return the flag if set
previously when the user flag was provided, the function would still try
to get a user from config. flag should take precedence
hace 4 años
Rob Loranger
dea0eb2d44
wf check for config when auth required
this adds a check for configured defaults during the command pre check
when authentication is required. using the values found if both are
present and only if both flags are ommitted.
hace 4 años
Rob Loranger
8625e42ce7
do not parse url from configured host
now that the scheme is not required in the configuration file, we can
assume the configured value is correct. as with other uses, the
configured value is only used when noth host and user are present.
hace 4 años
Rob Loranger
44501a2e8c
use default user when authenticating
if both a user and host are configured, the command auth should assume
that user and host when none specified
hace 4 años
Rob Loranger
836eea7dab
newClient must prepend scheme to default host
this updates newClient to prepend the scheme https to the default host
found in the global config, and only use said host when both the user
and host are configured
hace 4 años
Rob Loranger
72dbd1c7ef
requireAuth host message verbose only
hace 4 años
Rob Loranger
941d234395
log.Info will respect global flags
hace 4 años
Rob Loranger
55dcf5e79c
CurrentUser only use global when needed
by needed: when host flag was supplied, matches that configured and a
user is set in config as well. they should be a pair.
hace 4 años
Rob Loranger
630a867a34
update requireAuth helper, check logged in users
this uses the usersLoggedIn helper to check for already logged in users,
selecting the single user when only one present and returning and error
when multiple are logged in.
hace 4 años
Rob Loranger
58dd3f985a
helper func for logged in users
this function checks the host based path for any logged in users and
returns the number or users, a list of usernames and an error if any
hace 4 años
Rob Loranger
c218012d42
export UserHostDir
for use outside of package
hace 4 años
Rob Loranger
b85673b799
move LoadUser call out of newClient
to start on a fix for user actions when logged in with one user on a
given host with the wf binary, a user should now only be loaded by the
caller of newClient.
newClient no longer takes a bool for authRequired, all calls
updated to new signature and load the user where required.
hace 4 años
Matt Baer
60d987eed3
Clean up directories on `wf logout`
On logout, this deletes host / user directories if they're empty.
Ref T586
hace 4 años