• Michele Milidoni
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
[Canvas App/OAuth] Authenticate Salesforce to external app

Hi Community,
I read many guides about the authentication of Canvas Apps to Salesforce, but I haven't found anything for authenticating Salesforce to the external app. I thought to develop Oauth in Apex, and send the access token by a LifeCycleHandler. Unfortunately the two accessible context classes (ApplicationContext and EnvironentContext) don't allow to change the http header. 

At this point I am wondering if it is really possible to do.

Thanks a lot for any idea!
​Michele
Please help me with the correct answer.

A developer creates an Apex helper class to handle complex trigger logic. How can the helper class warn users when the trigger exceeds DML governor limits?
A. By using ApexMessage.Message() to display an error message after the number of DML statements is exceeded.
B. By using Messaging.SendEmail() to conthtinue the transaction and send an alert to the user after the number DML statements is exceeded.
C. By using PageReference.setRedirect() to redirect the user to a custom Visualforce page before the number DML statements is exceeded.
D. By using Limits.getDMLRows() and then displaying an error message before the number of DML statements exceeded.