How to call DecodeIntegrityToken API - java

I'm stuck trying to call Google DecodeIntegrityToken API from my Android APP. There is no documentation or examples on how to do it.
I have completed the setup and managed to get an IntegrityToken up to this point.
The setup: https://developer.android.com/google/play/integrity/verdict
Here I found calling the API in LARAVEL: Decode integrity token using Google PlayIntegrity API
and this one in .NET: How to get a decoded Play Integrity API token using the Google Client API for .NET
But how can I call it from Java? There is no information. I can't find a way to call the API to decode the Integrity Token.

The response you can decode using Java based hosted service. The integrity token can be sent to the Google server from hosted service and you can verify the response received from google. Enable PlayIntegrity API in Google Cloud Platform against the app and download the JSON file and configure the code. Similarly, you should enable PlayIntegrity in Google PlayConsole
Please check my answer

For those who are looking for the node.js solution check my answer here
Decode integrity token using Google PlayIntegrity API

Related

Firebase Auth REST - Log in with Microsoft Provider

I'm trying to log in users to a Java Web application written in Java Spark framework using firebase Auth REST API here. Reason is since I couldn't find a better way to integrate with Firebase from this framework.
I can use VerifyPassword end point to login using email provider. But I want to use the Microsoft provider in firebase Auth Console instead of email.
Is there a way to use Microsoft Authentication through firebase using the REST API?
Thanks in advance!
There is. You are looking for Sign In With OAuth Credential section in the Firebase Auth REST API documentation.
You can sign in a user with an OAuth credential by issuing an HTTP POST request to the Auth verifyAssertion endpoint
However, the process won't be pretty straightforward like it is when using Firebase SDKs. You would have to get an access token from Microsoft (or any auth provider) and then pass it in the request body of Firebase's REST API.

App engine endpoints auth with Google Identity Toolkit

I've successfully implemented user login in my android app with Google Identity Toolkit. I've also created an App Engine Endpoint to communicate from the Android app. Now I want to secure the endpoints with auth.
I know I can create a custom Authenticator for endpoint and do any kind of verification of the data in request header in there and get the job done.
But I don't know how to do the Gitkit verification there.
Basically
What data should I pass to reach endpoint calls from Android app?(token ID?)
What should I do in the custom Authenticator of endpoint to ensure the requests are valid?
I saw people suggesting to use Session or cookies. Will these work if I'm using the endpoint from Android app? If yes please give me some reference on how it can be done.
Gitkit tokens are JWT format, so you validate them on server-side just as any other JWT token.
See example documentation on how to validate JWT here: https://developers.google.com/identity/sign-in/web/backend-auth It's the same format.
I have also my own project to integrate it with Jersey server:
https://github.com/dlazerka/gae-jersey-oauth2. It uses recommended com.google.api-client library to actually verify the token.

Custom JWT based authentication for Google App Engine using Java

I am using Google App Engine with Java.
I would like to know, how to integrate custom JWT based authentication in Google App Engine.
I have seen https://developers.google.com/identity/choose-auth but I dont want the users connected with Google Account. I also want the users to sign in without an email address, but a username.
I searched on the internet but everywhere I looked, it is talking about the Google based authentication.
Thanks in advance.
It seems at the moment, there is no library available for doing this.
Also I was unable to find any documentation to do this.
Here is how I implemented it.
The client passes JWT in the Authorization header.
At the API endpoint (not in Filter, it wont work), I extracted the header and validated the JWT. I throws Exceptions from the validation function itself, so that I don't have to repeat a lot of code.

Twitter JSON API in Android Development

I Started working on Android Development for a while now. According to the tutorials im following im trying to retireve JSON info from the Twitter API...
As it was instructed in the tutorial, this is the code to use:
"http://api.twitter.com/1/statuses/user_timeline.json?screen_name=write the username"
HOWEVER, i got a response saying that the API is no longer available and i should migrate to API v1.1.
Could anyone please help on what to do to replace the url i was instructed to use??
NOTE
When i used the new url from API v1.1 : "https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=twitterapi&count=2"
i get the following:
"{"errors":[{"message":"Bad Authentication data","code":215}]}"
Old Twitter API did not require Authentication for retrieving user_timeline, but v1.1 requires authentication to retrieve data(https://dev.twitter.com/docs/api/1.1/get/statuses/user_timeline). According to Twitter API document user authentication is required for all the API v1.1 requests.
You can read more about authentication here
https://dev.twitter.com/docs/auth/oauth#v1-1

Login to facebook in android using REST API

I develop facebook application in android
i want to log in to facebook via HTTPClient , teh user give me username and password and then i connect to facebook.com/login
i want to make like this code
Facebook: Getting Incorrect Signature (104) when Getting Session Key
but in android, i tried to do that but when i get the session, a XML contain invalid parameter returned
can any one help me?
Facebook released an official SDK for Android applications. See this post on their developers blog.
You might want to try implementing the Android Facebook:Connect Library:
http://wiki.developers.facebook.com/index.php/User:Android
It's not official - but it seems fairly stable for most practical uses (allowing connecting and FQL queries, etc.)

Categories