Comments (3)
Hi Tim, thank you for your suggestion! "oauth2l curl" was added mostly to simplify the syntax for invoking API calls, and I did not pay attention to the output (stderr vs stdout) when implementing it. In fact, I do not even remember why the built-in "print" was used over the fmt version - this is likely a mistake. Feel free to put up a PR to correct the channels - however, this would be considered a "breaking" change. We should document the change well, especially considering errors else-where are being written to stdout today - and it may be useful if you can provide a concrete example of how to take advantage of the updated channels. We could include the change in the next major release. Thanks!
from oauth2l.
I also thought it was a mistake, but I wanted to check first. Go stdio isn't that intuitive.
I was thinking the corrected behavior could be behind a flag, but that would complicate things. I would indeed rather just release this as a major version.
I'll see if I can come up with a PR!
from oauth2l.
If we're making a breaking change anyway, maybe it would make sense to make the oauth2l-curl combo look more like sudo?
That way, one could prefix any curl command (for a relevant URL) with oauth2l + its flags to authenticate it, without having to alter the unauthenticated command any further. For example:
oauth2l --scope cloud-platform \
curl -fsSL https://cloudfunctions.googleapis.com/v2/...
It would probably also be trivial to get the same functionality in place for wget and httpie, to name but a few. Note that it wouldn't work for arbitrary commands (like sudo) because it does involve changing the wrapped command.
I imagine this would entail a more invasive change to the argument parser though.
from oauth2l.
Related Issues (20)
- Support id_token for JWT path HOT 3
- 123
- oauth token now contains trailing dots HOT 1
- Cannot get token for Google Photos HOT 4
- syntax error in linux pre-compiled binary HOT 3
- Invalid JWT: Failed audience check. HOT 1
- parse error: asn1: syntax error: sequence truncated HOT 8
- Enter authorization code: HOT 1
- Segfault on MACOS Monterey HOT 1
- Consider binary compression
- Errors go to stdout and don't produce nonzero exit status
- Authenticate a User for IAP
- Same access_token after refresh HOT 1
- password flow HOT 3
- `oauth2l web` fails on `failed to solve: process "/bin/sh -c npm run build" did not complete successfully: exit code: 1`
- Cannot generate refresh token. "missing 'type' field in credentials" HOT 2
- Oauth2l application is not opening in windows HOT 1
- impersonate service account and type jwt does not seem to work well together HOT 1
- Cannot generate refresh token with web app credentials - silent shut down. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oauth2l.