Java console program to call an OpenId provider with Open4java

75 views
Skip to first unread message

Jef Katz

unread,
Jun 29, 2015, 1:54:40 PM6/29/15
to openi...@googlegroups.com
Hi,

Is it possible to call an openid provider from a simple java console using OpenId4Java library ?

Thanks a lot.

ShengChe Hsiao

unread,
Jun 29, 2015, 9:10:09 PM6/29/15
to openi...@googlegroups.com
Hello

I'm afraid not. According the spec, openid cannot support implicit authentication. Maybe you should try openid connect!

--
You received this message because you are subscribed to the Google Groups "OpenID4Java" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openid4java...@googlegroups.com.
To post to this group, send email to openi...@googlegroups.com.
Visit this group at http://groups.google.com/group/openid4java.
For more options, visit https://groups.google.com/d/optout.



--
--------------------------------------------------------------------------------------------->
To boldly go where no man has gone before.
--------------------------------------------------------------------------------------------->
We do this not because it is easy. We do this because it is hard.
--------------------------------------------------------------------------------------------->
--------------------------------------------------------------------------------------------->

Matt Randall

unread,
Jul 4, 2015, 6:25:42 PM7/4/15
to openi...@googlegroups.com
To answer your question:

- It is possible to invoke an OpenID provider from a Java console program utilizing a query-string based request.  You can utilize java.awt.Desktop to invoke the URL of the OpenID provider, which will in turn invoke a browser for the user to authenticate.  It is not possible, however, to complete the transaction without a corresponding web counterpart to your application to receive assertion once the user has completed authentication.
- A possible solution would be to use OpenId4Java in your client application to create the request and launch the OpenID server, then have a web application receive the OpenID response.  This response can be forwarded to the console application by registering a URL handler on your platform with a specific scheme (e.g. myapp://....).  Note:  Java Web Start is probably the easiest way of handling this type of re-entry into your native app.

The intermediate web server requirement for handling the response could be avoided by using OpenID Connect, assuming that the OpenID Connect server supports non-https:// schemes when registering client applications.

Hope that helps

Jef Katz

unread,
Jul 5, 2015, 7:51:23 AM7/5/15
to openi...@googlegroups.com

Hi,
Thanks for your complete response i will have a look.

--
You received this message because you are subscribed to a topic in the Google Groups "OpenID4Java" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openid4java/bIyNHleQolo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openid4java...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages