Reverse Engineering an auth code query parameter passed to Play Framework in URL query Parameter - scala

I recently got thrown into a company to do DD on a SaaS solution that needs to generate codes to send invites. Has anyone seen or used this method of passing an API key/auth code? It's using the Play Framework. I don't have access to the play source code, just a compiled binary so I can't even see how the GET request is validated.
Eg:
https://<site.com>/?auth=10002-1644542228446-75ac043770463c36039f29d75304171c
I checked the packages used and there is io.jsonwebtoken.jjwt-0.9.1.jar used but I'm only familiar with passing it as a header "Bearer ". and haven't seen this three segmented formatting. XXXXX-XXXXXXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Any help would be appreciated. I know it's not a lot to go off but I'm only looking to be pointed at the method used to get started.

Related

How can I actually download/transfer a file found using UPnP?

I'm completely new to UPnP as a protocol, but I'm hoping to use it to transfer files from a Sony Camera to an iOS app I'm working on. So far I have SSDP discovery setup, I can read the UPnP client's services, search through folders and access file names, but the final hurdle which I'm stuck on is how to actually download/transfer the files once I'm able to list them!
What I end up getting is the below:
<item id="04_02_0624600856_000001_000001_000000" restricted="1" parentID="03_01_0624600856_000001_000000_000000">
<dc:title>DSC05076.ARW</dc:title>
<upnp:class>object.item.imageItem.photo</upnp:class>
<dc:date>2018-08-23T12:24:21</dc:date>
<res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM;DLNA.ORG_CI=1">http://192.168.122.1:60151/SM_DSC05076.ARW?%2104%5f02%5f0624600856%5f000001%5f000001%5f000000%21http%2dget%3a%2a%3aimage%2fjpeg%3aDLNA%2eORG%5fPN%3dJPEG%5fSM%3bDLNA%2eORG%5fCI%3d1%21%21%21%21%21</res>
<res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_LRG;DLNA.ORG_CI=1">http://192.168.122.1:60151/LRG_DSC05076.ARW?%2104%5f02%5f0624600856%5f000001%5f000001%5f000000%21http%2dget%3a%2a%3aimage%2fjpeg%3aDLNA%2eORG%5fPN%3dJPEG%5fLRG%3bDLNA%2eORG%5fCI%3d1%21%21%21%21%21</res>
<res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_TN;DLNA.ORG_CI=1">http://192.168.122.1:60151/TN_DSC05076.ARW?%2104%5f02%5f0624600856%5f000001%5f000001%5f000000%21http%2dget%3a%2a%3aimage%2fjpeg%3aDLNA%2eORG%5fPN%3dJPEG%5fTN%3bDLNA%2eORG%5fCI%3d1%21%21%21%21%21</res>
I would (With my naive experience of simple HTTP APIs) then expect to simply be able to download the file in question by hitting:
http://192.168.122.1:60151/SM_DSC05076.ARW or similar (I'm assuming I have to change this URL slightly as the file is listed as image/jpeg rather than RAW?
Whatever combination I try of the full res object, snipping bits, decoding the url e.t.c. I always get a 404 response when trying to visit the URL in question. Is there something more complex I need to do here? Or something simple that I'm missing?
Thanks in advance!
The problem here was that I was using a url from a previous session. It turns out that the urls change between connection sessions, which is why I was getting a 404.
Lesson learned: UPnP is highly dynamic, and you can’t rely on caching images under their access MRL!

Claudia.js jasmine post/put body key

I'm using claudia-api-builder and attempting to write tests using jasmine-node. I'm using the proxyRouter on my API using this tutorial https://claudiajs.com/tutorials/testing-locally.html, and I can pass path parameters fine as demonstrated. However, I can't find what the key is for the body of the request.
For example it says
You can fill in the other properties (eg queryStringParameters)
according to what the test expects
But I can't find anywhere that lists the possible properties. The API Gateway Proxy Object link also doesn't seem to go to anything useful, as the sample doesn't seem to include a body.
Does anybody know what the key I should be using is? Thanks!
Worked it out - somewhat embarrassingly it's just body.

Advanced REST Client: adding query parameters

Advanced REST Client seems like a neat REST client implementation to try REST-APIs.
But, I can't find how I can add query parameters to the URI of the API, but without putting it up the with the URI itself.
for example, to generate some URL like
https://api.example.com/v2/users/?age=25&fanOf=lakers
i want to add parameters like "age"=25 and "fanOf"="lakers".
i know it's there somewhere but can't find it plainly on, otherwise intuitive interface, `Advanced REST client".
After a bit of failed exploration on Internet & SO of-course, got it from a tip of a co-worker.
The option opens up by clicking the down-arrow on the left-side of the url-box.
Screenshot with new version 12.1.4 of ARC client

Apigee can't add TradeTracker Soap API

I'm very new to Apigee.
I'm adding an existing WSDL service as a API proxy.
When fetching the SOAP functions, all looks good. Every single one is imported and are setup correctly.
When i then hit the save button the proxy is created, but are never submitting the revision to the server.
When looking into the problem I see that i get a 502 error back from a file named https://enterprise.apigee.com/gw/upload/[NAME]/tradetracker-api/?validate=true
Also a TypeError: 'undefined' is not an object (evaluating 'b.then') are thrown from a file named 24efdbdd.proxy-editor.js
As i'm using Apigee's own website to add the proxy, so there's not much i can do about it.
This is happening in both Chrome 32, Safari 7 and Firefox 25 and the error has been there for at least a week.
I can't be the only one using Apigee's which keep's getting this error!?
There appears to be an issue with the WSDL file format -- not entirely sure what it is as one WSDL validator I used said it was okay, and another one choked on it saying it wasn't able to parse the file.
I've opened an issue with the Apigee product team to see if A) we can identify the issue with this WSDL and B) improve the product to throw a proper error rather than timing out.
This is fixed in the next release that is scheduled for release on 2/5/2014.

Samples not working for Web API Help Page when using an Entity Framework Complex Type in the model

I have an EF code first model that includes some Complex Types. Generating Web API controllers works without any problem, but when generating the Web API Help Page as described in http://blogs.msdn.com/b/yaohuang1/archive/2012/08/15/introducing-the-asp-net-web-api-help-page-preview.aspx then the samples don't get generated. The error message given is :
An exception has occurred while using the formatter 'JsonMediaTypeFormatter' to generate sample for media type 'application/json'. Exception message: One or more errors occurred.
The same thing happens for the rest of the media types. I know there was a problem some time ago with complex types and serialization but it was solved when the Json.NET formatter was included by default in Web API.
Could this be related? Anyone else having the same problem? Any ideas?
My guess is that this is most probably due to the referencing loops that your model has. For example, can you give a try in generating the help page by making the following change to the Json formatter. you should see the sample getting generated:
config.Formatters.JsonFormatter.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize;
config.Formatters.JsonFormatter.SerializerSettings.PreserveReferencesHandling = Newtonsoft.Json.PreserveReferencesHandling.Objects;
Also, you should see similar error even during runtime actually if you do not make the above settings.
For XmlFormatter and self referencing loops, you can look here.