Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config: improved updatehub credentials getter #33

Merged
merged 1 commit into from
Aug 25, 2017

Conversation

pablopalacios
Copy link
Contributor

uhu config main object has now 2 main methods, get_credentials and
set_credentials, both used to get and set UpdateHub server access key
and access secret.

Config.get_credentials is able to get user credentials from
environment (with UHU_ACCESS_ID and UHU_ACCESS_SECRET variables) and
from ~/.uhu file. Environment variables are priorized. Also,
get_credentials raises an error if no credential is provided. This
helps clients to deal properly if users have not set its credentials.

With this modifications all config module dependents (updatehub, repl
and cli) were update to follow what is stated above.

Signed-off-by: Pablo Palácios ppalacios992@gmail.com

uhu config main object has now 2 main methods, get_credentials and
set_credentials, both used to get and set UpdateHub server access key
and access secret.

Config.get_credentials is able to get user credentials from
environment (with UHU_ACCESS_ID and UHU_ACCESS_SECRET variables) and
from ~/.uhu file. Environment variables are priorized. Also,
get_credentials raises an error if no credential is provided. This
helps clients to deal properly if users have not set its credentials.

With this modifications all config module dependents (updatehub, repl
and cli) were update to follow what is stated above.

Signed-off-by: Pablo Palácios <ppalacios992@gmail.com>
@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) to 94.891% when pulling a8c9ab8 on pablopalacios:auth into 70366a2 on UpdateHub:master.

1 similar comment
@coveralls
Copy link

coveralls commented Aug 25, 2017

Coverage Status

Coverage increased (+0.06%) to 94.891% when pulling a8c9ab8 on pablopalacios:auth into 70366a2 on UpdateHub:master.

@otavio otavio merged commit c024b65 into UpdateHub:master Aug 25, 2017
@pablopalacios pablopalacios deleted the auth branch August 28, 2017 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants