I connect with an external link of an API then I have to keep the session to consume another link with the connected session ,
it's the code for authentication, I need to send a new post request to display a list but with the same login session
enter image description here
Related
I am trying to call graph api so I had followed the procedure mentioned on the site. I had registerd the App in https://apps.dev.microsoft.com/portal/register-app
and got the client id and and then I am trying to make a ajaxs call url
"https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=XXXXbxxxxxxx-bf22-4bdb-bXX-cd32a729a31f&redirect_uri=https://webidetestingXXXXXX-XXXXXXXXXXX.dispatcher.int.sap.hana.ondemand.com/webapp/index.html&response_type=code&scope=openid+Mail.Read";
this always opens a login page and How can I pass the username and password after the call.
second-I call this url and enter the credentials it shows me an error of Microsoft account is experiencing technical problems. Please try again later.
Can you please guide me what i am missing or any example in sap ui5 environment to call such graph Api
this always opens a login page and How can I pass the username and password after the call.
When directing the user to the /authorize endpoint , microsoft server will show the login page to let user enter the username/password , after that you couldn't pass username/password to that in your own code .If you don't want to show the login page or need to use own login page , it is possible to sign in a user with the username and password flow as noted here. But that flow needs writing passwords for identity provider into your custom website , and you should check more at the Constraints & Limitations section .
I call this url and enter the credentials it shows me an error of Microsoft account is experiencing technical problems.
Please provide more details of that error , you could find error message in browser address bar like :https://login.live.com/err.srf?lc=1033#error=invalid_request&error_description=xxxxxxxxxx
I am new to Rest API and trying to develop a client for ArcGIS Online. I tried to login to ArcGIS.com using my login credentials and then see the maps that I have posted on the server. When I click on any map, it opens up in browser with a url like this.
https://services.arcgis.com/N2SwjtBNabcd069C/arcgis/rest/services/IMap/FeatureServer/1
Then I created a different login account, and then published map and tried to open that in browser it showed up with a different url like this
https://services2.arcgis.com/N2SwjtBNabcd069C/arcgis/rest/services/IMap/FeatureServer/1
Note the start of the url
first one is
https://services.arcgis.com/
and second is
https://services2.arcgis.com/
Now my problem is when I try to login in my client application that I am developing. I am able to generate the token, account id and account name. But how do I know which server should I search for to locate my layers(i.e. services2.arcgis.com or services.arcgis.com)? Where can I get this information from
P.S: N2SwjtBNabcd069C in above url is the account id
After you login, and generates your token you can make the following query to see the url of your content.
http://www.arcgis.com/sharing/content/users/<username>?f=json&token=<generatedToken >
This will return you the json that contains the url of your service.
I am using PhoneGap 3.0.0 and trying to create a 'simple' login and connection with facebook in order to use Facebook's post dialog to post on behalf of my application to users' Facebook pages.
Here is my understanding of how the connection logic should work:
1. he application calls out facebook login in a new window (within the application itself), but it is linked to our app data
2. so, when FB gets a successful login, they redirect to OUR server, but now with a live Facebook accessToken
3. with it, in my server, I get the session data of the person
4. then automatically, that mini-browser within the application closes
5. and comes back to the application
6. now I make an alert of the facebook token
7. and then I require our server for the user's token from my application
8. once I retrieve our Token, I can initiate the automatic load of information into the application... that's it
9. when the mini-browser closes and we get back to the application I retrieve our session token, automatically
** The problem here is that this action is not happening, the session register is not happening in our server for some reason. It does work in the test module that I developed, but not in the complete application even with the same module... that's the problem here. I get perfectly the access token from facebook, but I don't get it from our server... like their session in our server never gets registered.
My application uses Facebook connect server-side login (using o-auth).
This means that the user gives power to the server to do action on his behalf.
Once the server received the TOKEN from Facebook, it set a "SESSIONID" attribute on the users request.
On the client side, I implemented this using a WebView, i.e. When the user opens the application for the first time, theres a webview with a facebook connect button, when it clicks on the button he will go to my server, get redirect to facebook and start the whole server-side login chain.
What is the best way to move the SESSION ID from the WebView, onto the other controllers?
Where is the best way to store it (Android/iPhone)
How should I append this SESSION ID on each request? Do i need to add a new header each time i send a request to my servers? (Since the session was set on the WebView "browser" and then is moved to the native client i assume the session is closed. correct?)
I am developing photo sharing app in iOS5. In this, I need to implement login through PHP web service. I implementyed PHP Web service and also i got json string well. Now How can i check whether the user is logged in or not when the application launches and also how can i save username and password when user first login? Please provide me the solution as soon as possible. Thanks in advance
For checking the status of login user when you send the logine details through web services you can set a flag of the login status in the database and each and every time you can check it for the login status.
for the username and password save in iphone application you can check following links :
How do save username and password in my twitter application in iphone
https://stackoverflow.com/questions/8323411/how-to-save-and-read-the-username-and-password-in-iphone
I used a REST server for a similar iphone application. I created a REST server endpoint at the website end. There was a specific url just to test whether a user was logged in or not.
I hit this url inside my iphone application. I used an NSURLRequest and obtained the json object returned by the REST server. If the user was logged in, the json object contained the username. If user was not logged in, a different json object was obtained.
I do not know how you are implementing web services, but there should be a method you can call just to get the login status. You can then examine the json object returned.