How do we authenticate using IDAnywhere Authentication? - java

What is IDAnywhere authentication? How can we use this authentication in Java to consume an API through its Url. The same url I can access now in browser with an username and password.
Example - www.abc.com/products/id - gives me a json data as a response in the browser.
I want to get this done using and Id Anywhere auth. Please help.
Can anyone share any open resource to understand IDAnywhere authentication in detail.
Thanks in Advance!

Related

Authenticate on browser and make a POST request

I am facing an issue on my project. I have to send a POST request to a vendor's API. But I am getting the response login is required.
The vendor has not exposed the Login API , but has given the login url. It wants us to authenticate on the browser and then send the POST request from our Java code.
Can anyone please help us that if it is possible to this?
I have tried to launch the login url from my Java code. Then I authenticate it. But since I have authenticated in Browser's process so I am not able to send the POST request from my Java code.
Ideally you should make a GET request using the login url (a REST call from the Java code and not via a browser process) which would return you a valid access token or something similar, using which (ideally on the header), you should make the POST request which would allow the vendor's API to authenticate your request.
You would need to provide sample code and what you have tried for me to help you further, but I hope you get the idea.

How to create SSL for Rest API?

I'm learning Web services. I have created an Rest API on local machine in eclipse. And the url looks like this http://localhost.com/Web/Test/Client
What It does is when I call this url as POST method with username and parameters in url's body, I get one token which I'm using somewhere else. Upto here its working fine. I pass username and password and I get a token once my API's code verifies the credentials coming in url's body.
So after that I read about security of Rest API so that no body could access my credentials which are coming with url. It says it needs to be converted into HTTPS from HTTP.
But I could not understand more how and where this security needs to be configured in my code. Do I need to write any code to achieve this or any settings are required ? I'm totally blank here.
Can anyone please help me to understand this and tell me what needs to be done to get HTTPS for my url ?
What you need to do here is create a self signed certificate and configure channel security. I highly recommend you to use spring security framework to get this thing done. This article will help you.
To require HTTPS for the login page modify your security configuration by adding the following:
http.requiresChannel()
.antMatchers("/login*").requiresSecure();

How to get userinfo with Microsoft OAuth after successfully authenticated

My applications should login with Microsoft account (OAuth Provider). I got stuck to get user info after successfully authenticated by using following URL
https://login.live.com/oauth20_authorize.srf?client_id=CLIENT_ID&scope=SCOPES&response_type=code&redirect_uri=REDIRECT_URL
Can any one please help me to get user-info? Is there any library that I need to include for that ?
I'm getting authenticated code but I don't know how use ? I'm working with JAVA
The userinfo endpoint is https://apis.live.net/v5.0/me. Before you call it you need to exchange the code for a token.
For anyone stumbling here.
OpenID discovery URL: https://login.live.com/.well-known/openid-configuration
Microsoft doesn't provide userinfo_endpoint in the service configuration json
UserInfo URL : https://graph.microsoft.com/v1.0/me
Make a GET request to this url with header containing access_token that you got after exchanging auth_code
Key: Authorization
Value: Bearer <access_token>

how to implement the instagram login Oauth using javascript and java

I'm new to Oauth and to instagram.I got register for the application and got client id, client secret, redirect url.I don't have any idea how to implement it.Can anyone help me out.
Seems like its not possible to authenticate Instagram Login.There are not still providing any API to authenticate an account with username and password credentials.You can authenticate your account by this request
https://api.instagram.com/oauth/authorize/?client_id=CLIENT-ID&redirect_uri=REDIRECT-URI&response_type=code
You will get ClientID by
Register

Using Webservice to send username and password from PHP to JAVA Api

I've gone through many sites and found out webservice is the one way to send the values(username and password) securely from one server to the other server.
In my Php Application i've to send my username and password from php page (vehicle.php) to the java api page (someheader://someip:someport/track/Track?page=map.fleet). That Api should accept the username and password ,verify them and login.
My problem is i dont know how to send a request with username and password to this Java Api from php page through webservice. Please help me guys.
Thanks,
SJ
This tutorial should point you in the right direction.
Don't forget to hash your passwords before sending them around.
You said you don't know how to send to send request to web service. First test those services using tools like storm, SOAPUI. Here you will get an idea of what inputs are to be passed and what's output. The least you should know what's the format (XML) of request.

Categories

Resources