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

Authentication settings from App settings #7

Open
robinhultman opened this issue Dec 18, 2018 · 4 comments
Open

Authentication settings from App settings #7

robinhultman opened this issue Dec 18, 2018 · 4 comments

Comments

@robinhultman
Copy link

Would it be possible to refer to an app setting instead of the actual authentication settings in the attribute parameters (for instance the sas key of the Event Grid binding extension), like the Event Hub binding for instance?

@fbeltrao
Copy link
Owner

Hi @robinhultman,

If you define them as %eventgrid_sas% the value should map to your app settings value (in that case eventgrid_sas).

Could you please give a try?

@petrce
Copy link

petrce commented Jan 9, 2019

Hi @fbeltrao,
can it automatically load from settings?
Or do we need to write
[EventGridOutput(SasKey = "%eventgrid_sas%", TopicEndpoint = "%eventgrid_endpoint%"... )]
to every function?
Thanks

(Btw awesome extension ;)

@fbeltrao
Copy link
Owner

Right now you need to use the %setting_name% to load from settings. With a few changes I believe it would be possible to use the string passed as the setting name.

I implemented this way so you can have both.

Glad you like the extension!

@petrce
Copy link

petrce commented Jan 21, 2019

I believe to allow autoload from settings you need to use:

    [AppSetting(Default = "SasKey")]
    public string SasKey { get; set; }

instead of:

    [AutoResolve(Default = "SasKey")]
    public string SasKey { get; set; }

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

3 participants