        OAuth 2.0 IDtoken Decoder Example


This sample is used to decode the JWT tokens. Authorization server
may encrypt/sign the IDToken based on the client configurations 
and authorization server's settings.

Using open id authorization flow or implicit flow client can obtain jwt tokens.

The sample is implemented as command line application. 
The logic can be used with any thick desktop clients, mobile
applications or even server hosted web applications.

Pre-Requisites
==============
This sample assumes the expertise with the following technologies

* Java 1.8
* Maven for building and dependency management

Compile
=======
Maven has to be installed to compile and run the example.  Download
maven from http://maven.apache.org/download.cgi and invoke the
following steps

set the JAVA_HOME to Java SDK version 1.8 path

Run the following commands
1) mvn compile
2).mvn install

This will compile the sample, package & install in local repository

Run
===

1. issue the following command

mvn exec:java

option a: plain
	This option can be used when the Authorization server sends the id token in the plain text format i.e. without signing and encryption	
option b:verify signature
	This option can be used when the Authorization server sends the idtoken by only singing. 
option c:decryptjwt
	This option can be used when the Authorization server sends the idtoken by only encrypting. 
option d:DecryptAndVerifySignature
	This option can be used when the Authorization server sends the idtoken by signing and encrypted.
option e:Exit
	exit the application.

Note:
Make sure in jwks file specify only one key

Based on the configurations choose the appropriate option and the sample
displays the idtoken json on console output. 
