• Jason Harris 1
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 2
    Replies
Based on this line:
'The OAuth 2.0 JWT bearer token flow defines how a JWT can be used to request an OAuth access token from Salesforce when a client wishes to utilize a previous authorization. Authentication of the authorized application is provided by a digital signature applied to the JWT.'
in:
https://help.salesforce.com/HTViewHelpDoc?id=remoteaccess_oauth_jwt_flow.htm&language=en_US
If I have created a brand new Connected App and uploaded a digital certificate, how is the 'previous authorization' provided before JWT Bearer flow can be used?
Hi,

In Java, I am attempting to POST a generated (in Java) JSON Web Token to https://login.salesforce.com/services/oauth2/token.

The form contains the correct fields:
grant_type : urn:ietf:params:oauth:grant-type:jwt-bearer
assertion : <generated token>

Where the <generated token> contains (encoded as per page here: https://help.salesforce.com/apex/HTViewHelpDoc?id=remoteaccess_oauth_jwt_flow.htm&language=en_US):

{\"alg\":\"RS256\"}.
'{'"iss": "<client id>", "sub": "integration@payliquid.com", "aud": "https://login.salesforce.com", "exp": "1427801530366"'}'.

which is then signed using the self-signed certificate uploaded to the Connected App in our org.

Everything seems correct but I can only get "Invalid Assertion" back. The user "integration@payliquid.com" is API Enabled. What else do I need to do or how do I determine what the actual issue is?
If I specify topic as below:
SELECT Id, Name from Contact

then when I change Last Name or First Name in Contact, I get a push for a 'Name' change.

However, if I change topic to
SELECT Id, LastName from Contact
I don't get a push notification when changing LastName.

This is all from within workbench, vs 32
 
I have created a PushTopic as below:
{
    "Name" : "contact_with_notify",
    "Query" : "SELECT Id, LastName, FirstName, Phone from Contact",
    "ApiVersion" : 32.0,
    "NotifyForOperationCreate" : true,
    "NotifyForOperationUpdate" : true,
    "NotifyForOperationUndelete" : true,
    "NotifyForOperationDelete" : true,
    "NotifyForFields" : "SELECT"
}

but no matter what value I set for 'NotifyForFields', subscriptions to this topic only receive notifications when every field in the topic query is changed. How do I modify query so that a notification is sent when ONE field in query changes? Or do I need a topic per field?
I have created a PushTopic as below:
{
    "Name" : "contact_with_notify",
    "Query" : "SELECT Id, LastName, FirstName, Phone from Contact",
    "ApiVersion" : 32.0,
    "NotifyForOperationCreate" : true,
    "NotifyForOperationUpdate" : true,
    "NotifyForOperationUndelete" : true,
    "NotifyForOperationDelete" : true,
    "NotifyForFields" : "SELECT"
}

but no matter what value I set for 'NotifyForFields', subscriptions to this topic only receive notifications when every field in the topic query is changed. How do I modify query so that a notification is sent when ONE field in query changes? Or do I need a topic per field?