Posts

Showing posts from 2015

OpenIDConnect prompt parameter in Wso2 Identity Server

Image
From this blog post we will see how Wso2 IS supports for prompt parameter to be used in OpenIDConnect authentication request by using the playground sample. The Prompt parameter According to the OpenIDConnect specification, by using prompt parameter we can force the authorization server to do specific tasks. Wso2 Identity Server 5.1.0 (which will be released in few weeks) supports three values to be used with prompt parameter. prompt=none   If an end user is not already authenticated  or if there is not pre-configured consent(though there is an already authenticated user) the Identity Server will return an error page and if there is an already authenticated user and pre-configured consent the Identity Server will provide the authorization code. We can send the authentication request with prompt parameter to Identity server by using playground sample as follows. If there is not already authenticated end user you will get an error from Identity Server as below. Though

Validate XML using XSD

Validate XML against XSD XSD(XML Schema Definition) contains set of grammatical rules, Which can be used to validate a given xml. Lets consider a sample XML file. <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="Projects.xsl"?> <catalog>     <model name="s3">         <network>GSM</network>         <launch>2012-10-12</launch>         <os>Android</os>         <version>4.1</version>         <cpu>dual-core</cpu>         <weight>111.5</weight>         <sim>mini-sim</sim>     </model>     <model name="s5">         <network>GSM</network>         <launch>2013-10-12</launch>         <os>Android</os>         <version>4.4</version>         <cpu>quard-core</cpu>         <weight>140.5</weight>       

Building an XML Structure and Parse the XML file

Image
Through this article, let me create a simple XML file and parse it using a DOM Parser. First of all let's create a sample XML file with some elements and attributes. Build an XML fil e <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="Projects.xsl"?> <catalog>     <model name="s3">         <network>GSM</network>         <launch>2012-10-12</launch>         <os>Android</os>         <version>4.1</version>         <cpu>dual-core</cpu>         <weight>111.5</weight>         <sim>mini-sim</sim>     </model>     <model name="s5">         <network>GSM</network>         <launch>2013-10-12</launch>         <os>Android</os>         <version>4.4</version>         <cpu>quard-core</cpu>         <weight>14