I'm using the auth0-spring-security-api and I have a scenario where I need to update the app_metadata for a user when they make a request to an endpoint in my API. I've been looking for any sort of example or even method in the source that could give me a clue on how to do this and I just haven't seen anything. Does anyone know how to do this?
After a bit of searching I found a solution. The answer is essentially that you need to connect to the management API via a http request that you can find in the Auth0 management api examples for various endpoints. I was somewhat hoping that they would have some sort of existing java library to make it easier instead of having to roll my own. I did however find this github repo
that explains what is needed to connect to their API.
Related
First timer here and just starting with (the latest) SonarQube. Are there client libraries to download through the web-api already written and available? And is there a set of JAVA classes established that map to the structure of the JSON that will be returned that already exist? I was able to write my own test JAVA code to connect and to parse using the web api provided for one call I wanted, by building my own classes. But it seems like a lot of work to do this for all the data I hoped to pull and wondered if someone had done it already and/or Sonar provided it. And the web-api is a bit cryptic. Had to hover over values to figure out the exact call. I didn't see what I was looking for in the documentation or here. Or is there a better way to dump the data efficiently out of the GUI? Thank you!
Concerning, JAVA client library to request the SonarQube web services, we do not provide such library. There are lot of great tools to do a HTTP request and parse the JSON (see for instance OkHTTP and GSON).
Concerning "the web-api is a bit cryptic", I would be very interested to hear all your feedbacks about this, please share these feedbacks on the Google Group in order to discuss them and improve SonarQube web services.
I have a web ui based app which I have been told, calls a rest microservice/webservice. There is no documentation for this service and there is no one who can explain the huge code to me. Moreover, the code is not self documenting.
I want to understand how the service works, by mapping the actions done on the web UI to the service calls. After googling, it seems that I can take two approaches to do that.
1 - Use chrome developer tools network module.
2 - Use fiddler or charles proxy.
Please tell me which approach is best and why. If both are not good, then please tell me how I can achieve my goal.
Thanks.
Given it has been clarified that #testmonkey has access to the source which is a spring boot rest application and the requirement is an easy way to explore and document the rest interface. Its fair to answer that YES you could use fiddler or chrome, however given access to the source a better and more complete solution is the HAL browser:
http://docs.spring.io/spring-data/rest/docs/current/reference/html/#_the_hal_browser
After going through so many google sites, reading so many QA in stackoverflow, really getting confused how to implement SP using SAML 2 with Java.
I understand the theory concept but not getting a clue how to implement it exactly.
Currently, my client already shared IDP metadata file with me and asking for SP metadata file. This is my first struggling point.
How to generate metadata files actually? Is there a tool to generate it?
How to implement SAMLRequest generation, SAMLResponse parsing using Java libraries.
People recommending so many publicly available sites which supports IDP, SP functionalities but could not be able to choose the right one to proceed. I need some specific example of Service Provider implementation in Java with SAML 2.
Really appreciate if somebody help me in this context. Please correct me if my questions are not clear so that i will try to edit it.
If you need to build a SP in Java I would recommend using Spring SAML module or the OpenSAML library, but these may give you more work. If you end up using OpenSAML I have a book, A Guide to OpenSAML, introducing the SAML and the OpenSAML library.
I also have a blogg with many examples.
I would however recommend that you first look into using a ready product for SAML like Shibboleth which is a free and open source solution for SAML. This will save you from needing to learn the specifics of the SAML protocol and also it will be much safer as different security considerations have already been made by the developers.
#Stefan has some good suggestions.
What you need is a SAML protocol client side stack. Refer : SAML : SAML connectivity / toolkit and the links inside the article.
In terms of your questions, different stack do this in different ways. Some of the commercial stacks that I have used have excellent documentation and sample code to do all this.
I am trying to get the project from github to work.
It can be found here: https://github.com/neo4j/java-rest-binding
Has anyone put this into a JAR already? I am to connect to a local neo4j store. Any other suggestions would be appreciated. I just want to be able to do a quick access of node zero.
As a complement to Axel's answer, here is a good available tutorial where you can find a lot of examples of Neo4J uses (core APIs, indexing, traversals, Cypher and REST interactions): https://github.com/jimwebber/neo4j-tutorial.
Especially, Koan11 class illustrates how to call the built-in REST API, Koan12 shows how to roll your own API via unmanaged extensions.
I recently posted answer to a similar question here.
Neo4j, REST API, java - cypher queries
From there you can grab my pom.xml and my java file for your quick example.
Also you might find this tutorial helpful.
http://thought-bytes.blogspot.com/2013/07/getting-started-with-neo4j-java-rest-heroku.html
How do I use OAuth within my Java GWT application?
In particular, I want to get a list of users in my Google Aps domain, using this API:
http://code.google.com/googleapps/domain/profiles/developers_guide_protocol.html
I know this sounds like a question, that probably has been asked many times before, but I couldn't find any Java code on how to realize the OAuth steps described in the API above.
I would be glad if someone could share some code, or point me to the right docs.
This tutorial by Matt Raible is easily the best one I've seen so far on OAuth and gwt. He also has a very good picture depicting the authentication flow, which I always find help. However, as Matt himself says, the solution is not 100% reliable, but it might still get you part of the way.
With this in mind, it might be better to just go with a pure javascript implementation of it. You'll find one such implementation right here. This SO thread might come in handy to you if you chose that path.
Best of luck to you.
What do you mean in your GWT application?
Do you mean client-side only?
Because on the server you can easily use the Scribe OAuth library.
It has a good documentation and is fairly simple to use.
For integrating OAuth and GWT, you should start with Scribe which handles the implementation of the OAuth:
https://github.com/fernandezpablo85/scribe-java
Next, you need to create a GWT widget that can handle the user's interactions to acquire permission to access their account. Then grab the response token, and make the API requests to the external site.
No point re-implementing OAuth when scribe already does it for you - you just need to. I'd probably aim to use a GWT Popup for doing the authentication:
http://gwt.google.com/samples/Showcase/Showcase.html#!CwBasicPopup