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

non-interactive authentication #17

Open
woodz- opened this issue Nov 5, 2022 · 1 comment
Open

non-interactive authentication #17

woodz- opened this issue Nov 5, 2022 · 1 comment

Comments

@woodz-
Copy link

woodz- commented Nov 5, 2022

It seems the auth-client documentation is lacking some parts like setting the interaction callback and the description, how authentication interaction works in general.

I am looking for a way to bypass interactive authentication and instead use credentials hard coded or obtaining them from env.

Is there some support and documentation doing so?

@libesmtp
Copy link
Owner

Looks like auth_set_interact_cb() is missing documentation.

Usage is pretty straightforward - the declarations in the header files and example/mail-file.c should give enough information to write a suitable callback. struct auth_client_request provides information on the required response. Depending on the SASL mechanism the callback may be called multiple times.

The auth interact callback need not be interactive depending on application requirements. The application callback might prompt the user for a response, look up a configuraion variable or make a database query etc. libESMTP itself does not care how the application obtains the response, only that it obtains it.

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