-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
4Questions
-
2Replies
JWT Bearer Flow and 'Previous Authorization'
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?
'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?
- Jason Harris 1
- April 01, 2015
- Like
- 0
- Continue reading or reply
OAUth JWT Bearer flow - invalid assertion details
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?
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?
- Jason Harris 1
- March 31, 2015
- Like
- 0
- Continue reading or reply
Why Streaming API PushTopic specifying Last Name (or First Name) on Contact not send out change notifications but when specifying Name, changes are pushed out
If I specify topic as below:
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
This is all from within workbench, vs 32
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 ContactI don't get a push notification when changing LastName.
This is all from within workbench, vs 32
- Jason Harris 1
- December 01, 2014
- Like
- 0
- Continue reading or reply
How should a Streaming API PushTopic be created so that updates to individual fields in the query result in a notification
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?
{
"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?
- Jason Harris 1
- November 27, 2014
- Like
- 0
- Continue reading or reply
How should a Streaming API PushTopic be created so that updates to individual fields in the query result in a notification
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?
{
"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?
- Jason Harris 1
- November 27, 2014
- Like
- 0
- Continue reading or reply