This documentation is for WSO2 IoT Server 3.2.0. View the documentation for the latest release.
Page Comparison - Setting Up A Federated IdP with OpenID Connect (v.14 vs v.15) - IoT Server 3.2.0 - WSO2 Documentation

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Create a new folder named company.page.sign-in in the <IOTS_HOME>/ repository/deployment/server/jaggeryapps/devicemgt/app/pages directory.
  2. Create a new file named sign-in.hbs in the company.page.sign-in directory you just created and copy the configurations given below to the file.

    Panel
    Expand
    titleClick here to expand and copy the configurations.
    Code Block
    {
     {
      !
     Copyright Copyright(c) 20172018, WSO2 Inc. (http: //www.wso2.org) All Rights Reserved.
    
     
     WSO2 Inc. licenses this file to you under the Apache License,
       Version 2.0 (the "License"); you may not use this file except
     in compliance with the License.
     You may obtain a copy of the License at
    
    
      http: //www.apache.org/licenses/LICENSE-2.0
    
       Unless required by applicable law or agreed to in writing,
       software distributed under the License is distributed on an
     "AS IS"
       BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     KIND, either express or implied. See the License
       for the
     specific language governing permissions and limitations
     under the License.
      }
     }
    {
      {#
       zone{#zone "title"
      }
     } {
      {!    !to override parent page title
      }
     } {
      {
       /zone}}
    {
        {unit      unit "cdmf.unit.ui.title"
         pageTitle = "Login"
        }
       }
    
     
     {
        {#
         zone {#zone "content"
        }}
       }<div < div class = "row">
    >      < div<div class = "col-xs-12 col-sm-6 col-md-6 col-lg-4 col-sm-offset-3 col-md-offset-3 col-lg-offset-4">
    >          < p<p class = "page-sub-title" > Login < >Login</p>
    < hr / > {      {# <hr />
               if{{#if message}}
         }        } < div<div class = "alert alert-danger"    style = "padding-right: 15px;" >>
                      < i<i class = "icon fw fw-warning" > < ></i> {{message}}!
    < /div> {      {       </if}}div>
           < div class = "panel-body" > {{/if}}
            < form id <div class= "signInFormpanel-body">
           method = "POST"      <form actionid="signInForm" method="POST" action="{{loginActionUrl}}" >>
                      < div<div class = "form-group" >
           < label       for = "username" > Username * < /label> < input<label type for= "textusername">Username *</label>
         name = "username"       class = "form-control"       placeholder = <input type="text" name="username" class="form-control" placeholder="Enter your username"
          autofocus = "autofocus"
          required = "required" / >
           < /div> < div class = "form-group" >     </div>
      < label       for = "password" > Password * < /label> < input<div type class= "passwordform-group">
          name = "password"       class = "form-control"        <label for="password">Password *</label>
               autocomplete = "off"       placeholder = "Enter your<input type="password" name="password" class="form-control" autocomplete="off" placeholder="Enter your password" required = "required" />
    >         < /div> {        </div>
    {#          if sessionDataKey        {{#if sessionDataKey}}
           } < input     type = "hidden"       name<input type="hidden" name="sessionDataKey"
          value = "{{sessionDataKey}}" / >
    {         {          {{/if}}
    {           {#        {{#if referer}}
      if referer           }         <input } < input type = "hidden" name="referer" value="{{referer}}" />
          name = "referer"          value = "{{referer/if}}"
    / > {            {             /if}} < div class = <div class="wr-input-control wr-btn-grp" >>
                          < button<button class = "wr-btn btn-download-agent" >
                 Log in             Log <in
    /button> < div id = "register-link-wrapper"             style = "float: right; padding-top: 10px;" > </button>
                  < a href = "{{@app.context}}/register"             class = "pull-right create-account" > Create an account < /a> < /div> < /div> < /form> < h4 > Other login options: < /h4> < a onclick = "javascript: handleNoDomain('wso2.org%2Fproducts%2Fiot', 'OpenIDConnectAuthenticator')"<div id="register-link-wrapper" style="float: right; padding-top: 10px;">
                href = "#"             id<a href= "icon-2" >
                 < img class = "idp-image"
    "{{@app.context}}/register" class="pull-right create-account">Create an account</a>
               src = "{{@page.publicUri}}/images/openid.png"           </div>
       data  - toggle = "tooltip"           </div>
     data - placement = "top"          </form>
      title = "OpenID Connect" / > Sign in with OpenID Connect < /a> <<h4>Other /div>login options:< /div>h4>
    < /div> {             <a  {
      onclick="javascript: handleNoDomain('wso2.org%2Fproducts%2Fiot', 'OpenIDConnectAuthenticator')" href="#" id="icon-2">
                /zone}} {      <img class="idp-image" src="{{@page.publicUri}}/images/openid.png" data-toggle="tooltip" data-placement="top" title="OpenID Connect" /> Sign in with {OpenID Connect
                   </a>
    ~#zone "bottomJs"          </div>
          } </div>
              </div>
    {{/zone}}
    {{~#zone "bottomJs"}}
       } < script<script type = "text/javascript" >
           
            function handleNoDomain(key, value) {
           
             document.location = "../commonauth?idp=" + key + "&authenticator=" + value +
                      "&sessionDataKey={{sessionDataKey}}";
         }
              } < /script>
    {
                     {
                      /zone}}
  3. Create a new file named sign-in.json in the <IOTS_HOME>/ repository/deployment/server/jaggeryapps/devicemgt/app/pages/company.page.sign-in directory.
  4. Copy the configurations given below to the sign-in.json file you created.

    Panel
    Expand
    titleClick here to expand and copy the configurations.
    Code Block
    titlesign-in.json
    {
     "version": "1.0.0",
     "layout": "uuf.layout.sign-in",
     "uri": "/login",
     "extends": "cdmf.page.sign-in",
     "isAnonymous": true
    }
  5. Create a directory named public inside the company.page.sign-in directory.

  6. Create a directory named images inside the company.page.sign-in/public directory.

  7. Download the http://demo.identityserver.io/icon.png file and rename the downloaded file to openid.png.

  8. Copy the openid.png file to the company.page.sign-in/public/images directory.

Now, you have configured WSO2 IoT Server successfully. Let's try it out and see.

...