1

I am unable to find official guide containing the description (methods, properties etc) of this Salesforce inbuilt class (OAuth2).

Can someone let me know ?

2
  • As far as I'm aware, there is no such class. What is the "namespace" for this class?
    – sfdcfox
    Jan 28, 2016 at 23:52
  • salesforce.stackexchange.com/questions/25021/… In this post, Mohith (first answer) has mentioned this class in his code. I too am unable to find info regarding this class.
    – Rainmaker
    Jan 28, 2016 at 23:58

2 Answers 2

4

The OAuth2 class you mentioned is outlined in the bottom of that post:

/*To get aouthentication detail Wrapper*/
public class OAuth2{
 public String id{get;set;}
 public String issued_at{get;set;}
 public String instance_url{get;set;}
 public String signature{get;set;}
 public String access_token{get;set;}    
}

It's simply used by JSON.deserialize to get the parameters from the OAuth2 response (which is in JSON form) so that you can read the various parts of the authentication response.

There is no standard class called OAuth2.

2
  • 1
    Guess I should read the whole code before jumping.....Should go from "interpreter" mode to "compiler" mode :)...tx a ton
    – Rainmaker
    Jan 29, 2016 at 0:04
  • 2
    @kvnfv I've done this, too. In fact, if I had a quarter for every time I'd misread something, I probably could have retired by now.
    – sfdcfox
    Jan 29, 2016 at 0:06
0

As sfdcFox mentioned, there is not Standard SF Class called "OAuth2".

I guess you are talking about implementing OAuth2 in salesforce. There are various good examples provided by Salesforce. There is noting much to copy them here, so directly putting the link for your reference

https://developer.salesforce.com/docs/atlas.en-us.api_streaming.meta/api_streaming/code_sample_auth_oauth.htm

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .