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

How to make request to fn-server that require authenticated header? #311

Closed
and1truong opened this issue Jun 8, 2018 · 4 comments
Closed

Comments

@and1truong
Copy link

Hi there, I added a simple authentication for my fn-servers, but I am not sure how to manage these fn-server from fn-cli. Can we configure request headers to the context?

Thanks.

@zootalures
Copy link
Member

zootalures commented Jun 8, 2018

Hey - great question!

Currently the Fn CLI and go sdk only support bearer-tokens for the default provider out of the box -

Supporting basic auth sounds like a good idea - I think this should be in the default provider (as an alternative to tokens.

You should be able to do this by updating the default Provider: https://github.com/fnproject/fn_go/tree/master/provider/defaultprovider - e.g. by accepting new config parameters (user/password?) for basic auth as an alternative to token.

@zootalures
Copy link
Member

I've put a basic idea together - would this work for you?
fnproject/fn_go#8

@and1truong
Copy link
Author

Thank you @zootalures

It's working by adding "token" to my context .fn/contexts/NAME.yaml.

I think we should update the context documentation to mention this cool option.

@zootalures
Copy link
Member

Awesome, glad it worked out, I’ll look at the docs asap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants