-
Notifications
You must be signed in to change notification settings - Fork 12
Support Oauth 2.0 Authentication for Event Grid API #855
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
Conversation
Cherry pick to beta success |
…re not being executed.
Cherry pick to beta success |
| else | ||
| //Try authenticating using AD | ||
| { | ||
| logger.Debug("Authentication using Oauth 2.0."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be posible to use GXLogging instead of the direct logger? This way, we can reuse the logic. For instance, GXLogging checks for enabled logs in each method.
The project already has a reference to GXEventRouter which references GxClasses.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ready. Thanks.
| else | ||
| { | ||
| throw ae; | ||
| throw new Exception("There was an error at the Event Grid initialization."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Throwing exceptions is more expensive than setting an error code or returning a message. Have we already considered managing errors in a way other than throwing exceptions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seemed like a good idea to me as it is now (I saw it in other projects) because the implementation of the methods for each provider was cleaner, and then in the class that implements the EO handles the errors...
Besides, it cannot be changed for some methods like Connect, because it calls using reflection the provider´s implementation and catches the exceptions..
Cherry pick to beta success |
claudiamurialdo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except for the comment about avoiding to create and throw exceptions, the rest LGTM.
Issue:104035