How do you mimic the click of a link button in a microflow?

0
I am working on making local modifications to the OAuth module. By default, there is a sequence of steps that is triggered when I click a link (link button) with target http://localhost:8080/signin/google. I need to replicate the behavior in a microflow so that this sequence can be scheduled without need for user interaction. The link address is configured as "signin/google". I am assuming this is translated to http://localhost:8080/signin/google, because I get identical behavior when entering "http://localhost:8080/signin/google" in the browser address bar. The most recent thing I tried was to trigger an HTTP request to http://localhost:8080/signin/google via a Java action. I configured the custom Java using  URLConnection connection = new URL(this.URL).openConnection(); connection.setRequestProperty("Accept-Charset", java.nio.charset.StandardCharsets.UTF_8.name()); InputStream response = connection.getInputStream(); connection.connect(); if (response != null) { return true; } else { return false; } per this article: http://stackoverflow.com/questions/2793150/using-java-net-urlconnection-to-fire-and-handle-http-requests. (To be explicit: url is http://localhost:8080/signin/google). Looking for guidance/correction on how "click" from inside a microflow.
asked
1 answers
0

Why can't you use a link button? You can set the attribute to something like ./signin/google and this will make sure you use the current server address. OAuth works by using a number of redirects and also a number of callbacks. I am assuming you want to do something after or before in the microflow before the OAuth is called. If you want to do it before I would run the microflow and then open up a page that redirects the user to ./sigin/google. Or if you want to run a microflow afterwards you could change the ./signin/ request handler to call a microflow after the request handler is called. Does this make sense?

answered