11 Commits

Author SHA1 Message Date
Lucas Roesler
d8c8e342c2 Allow configuration of CLI config via env variables
**What**
- Support configuration the faas-cli configuration directory path via
  the `OPENFAAS_CONFIG` env variable. When this value is set, the path
  will be overridden. When empty, we will also check the CI flag, which
  defaults the location to the current working directory. When neither
  `OPENFAAS_CONFIG` or `CI` are set, then the default location is in
  the current HOME folder.
- Various tests have been updated to use this new env variable instead
  of modifying the global variables. Also, the variables are now
  constants to prevent this kind of modiication in general.

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
2020-11-11 17:30:50 +00:00
Utsav Anand
a0df4e8fd0 Add CI env check to change dir and file permissions of artifcats
Signed-off-by: Utsav Anand <utsavanand2@gmail.com>
2020-10-07 17:50:40 +01:00
Vivek Singh
d2acc45560 Move auth from config to proxy
Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
2020-05-07 20:51:41 +01:00
Vivek Singh
2319347d63 Move cli authentication to config package
Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
2020-05-07 20:51:41 +01:00
Alex Ellis (OpenFaaS Ltd)
b0a70a3f4f Add client SDK for making proxy API calls
Decouples the "config" package from the "proxy" package so that
it can stand alone.

Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-02-26 08:31:18 +00:00
Vivek Singh
e83806606e Update unit tests and review comments
Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
2019-10-28 14:48:42 +00:00
Vivek Singh
5468fe2d89 Save oauth tokens to the openfaas config file
This commit saves oauth2 tokens to the openfaas config file with a
different auth type. The different auth type helps to determine whether
it is basic auth token or oauth2 token. It also refactors existing
config file function to cater the needs of auth command.

Fixes: #663

Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
2019-10-28 14:48:42 +00:00
Alex Ellis (VMware)
a0e326bee1 Update remaining copyright headers to author(s)
OpenFaaS project -> OpenFaaS Author(s) to show distributed
copyright.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-11-13 21:37:01 +00:00
Alex Ellis
b5198b22cb Refactor file names
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2017-11-11 17:27:17 +00:00
Alex Ellis
a638492ec0 Refactor errors usage to fmt.Errorf
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2017-11-11 17:27:17 +00:00
Stefan Prodan
5cd3ea22f1 login/logout commands
Signed-off-by: Stefan Prodan <stefan@weave.works>
2017-11-03 13:05:29 +00:00