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

Write a Real World Example for Auth #4819

Closed
DimuthuMadushan opened this issue Sep 19, 2023 · 13 comments
Closed

Write a Real World Example for Auth #4819

DimuthuMadushan opened this issue Sep 19, 2023 · 13 comments

Comments

@DimuthuMadushan
Copy link

DimuthuMadushan commented Sep 19, 2023

Description:
Currently, there is an example in the Ballerina auth repository that utilizes the LDAP user store. We need to add another example to the auth module, preferably one that incorporates file user store with scopes.

@DevTomilola-OS
Copy link

I would like to work on this. Kindly assign to me

@ThisaruGuruge
Copy link
Member

Hi @DevTomilola-OS! 🚀

We value your contributions and look forward to collaborating with you.
To help you get started, here are some essential resources:

  • Understanding Ballerina Platform: Learn what Ballerina is all about: Ballerina Platform
  • How to Contribute: Read our contributing guidelines to understand how you can contribute effectively: Contribution Guide
  • Learn Ballerina: If you're new to Ballerina or want to enhance your skills, our official website offers a wealth of learning resources: Learn Ballerina
  • Get Help and Connect: Join our Discord community to chat with fellow Ballerina enthusiasts and get assistance: Ballerina Discord

Remember, no contribution is too small, and your feedback is invaluable. Feel free to ask questions, propose ideas, or report issues. Together, we can make Ballerina even better!

Happy coding! 🎉

@DevTomilola-OS
Copy link

Hello @keizer619 I'm sorry I won't be working on this issue anymore. Thank you.

@DevTomilola-OS DevTomilola-OS removed their assignment Oct 6, 2023
@harshalkh
Copy link

harshalkh commented Oct 7, 2023

@keizer619 @ThisaruGuruge can you please assign this to me, I can work on this.
As @DevTomilola-OS won't be working on this as per his comments.

@ThisaruGuruge
Copy link
Member

@keizer619 @ThisaruGuruge can you please assign this to me, I can work on this. As @DevTomilola-OS won't be working on this as per his comments.

Hi @harshalkh,

Thank you for considering this issue. I have assigned it to you now.

@harshalkh
Copy link

@ThisaruGuruge @DimuthuMadushan I am trying to setup few things and giving a try to execute APIs. Got some strange issue - /foo/bar works without any issue, whereas /accounts/account not...

harshalkh/module-ballerina-auth#3
GitHub workflow to test my code - https://github.com/harshalkh/module-ballerina-auth/blob/master/.github/workflows/ballerina.yml
Any help that you can provide?

@DimuthuMadushan
Copy link
Author

Hi @harshalkh,

It's great to see you working on this. I went through your code and noticed that you forgot to enable SSL in the HTTP listener, which might be causing the issue. To fix this, you can set up the SSL certificate and key using the secureSocket field in the listener configuration. You can find more information in the SSL/TLS example.

I also recommend adding Ballerina tests to make it easy to test your APIs. It's pretty straightforward, and it will make your example more complete and practical. To learn more about Ballerina testing, check out this short YouTube video series: Ballerina Testing Video Series

@keizer619 keizer619 moved this from Todo to In Progress in Hacktoberfest 2023 Oct 13, 2023
@harshalkh
Copy link

harshalkh commented Oct 13, 2023

@DimuthuMadushan as per suggestion I have enabled SSL as well as added test cases. Still not able to figure out where it's failing. Can you pls refer above links and suggest?
After enabling debug below is error

time=2023-10-13T21:10:02.266Z level=DEBUG module=ballerina/auth message="File user store values are not provided or not properly configured."

UPDATE- able to get it running now after adding Config.toml in test folder as well
https://github.com/harshalkh/module-ballerina-auth/blob/patch-1/examples/banking-accounts-service/tests/Config.toml

Thanks

@harshalkh
Copy link

@DimuthuMadushan / @ThisaruGuruge Finally I am able to raise PR - ballerina-platform/module-ballerina-auth#1057

Please review and let me know if any suggestions.

@DimuthuMadushan
Copy link
Author

Hi @harshalkh That's great! I glanced at the PR and made a few minor suggestions.

@harshalkh
Copy link

@DimuthuMadushan @ThisaruGuruge - I have made requested changes. Please verify and let me know if anything needs to change.
Thanks.

@harshalkh
Copy link

@DimuthuMadushan @ThisaruGuruge - I have made requested changes. Please verify and let me know if anything needs to change. Thanks.

@DimuthuMadushan @ThisaruGuruge - I have done requested changes and verified test cases as well.. please check.

@DimuthuMadushan
Copy link
Author

Hi @harshalkh we have approved your PR. Thank you for your valuable contribution. 🎉

@github-project-automation github-project-automation bot moved this from In Progress to Done in Hacktoberfest 2023 Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

No branches or pull requests

5 participants