Coder Social home page Coder Social logo

identity-local-auth-limited-sessions's Introduction

Active session count based authenticator

Welcome to the WSO2 Identity Server (IS) Session Count Based Authenticator.

Introduction

Active session count based authenticator can be used with WSO2 Identity Server to provide authentication based on the user's current active session count. This enables administrators to enforce active session count limitations. This component requires WSO2 Identity Server Analytics to retrieve user session information. Further this can be used with conditional authentication functions (Repository) to provide customized authentication with conditional authentication.

Getting started

  1. Download WSO2 Identity Server and extract it.
  2. Download WSO2 Identity Server Analytics and extract it.
  3. Build Active session count based authenticator (using mvn clean install)
  4. Go to components/org.wso2.carbon.identity.application.authenticator.sessionauth/target
  5. Copy org.wso2.carbon.identity.application.authenticator.sessionauth-.jar file to <IS_HOME>/repository/components/dropings folder.
  6. Go to components/org.wso2.carbon.identity.application.authentication-endpoint/target.
  7. Copy sessioncountauthenticationendpoint.war file to <IS_HOME>/repository/deployment/server/webapps folder
  8. Configure Identity Server Analytics as described in this document.
  9. Start the WSO2 Identity Server and WSO2 Identity Server Analytics and use the Active session count based authenticator.

Sample

This sample describes how this authenticator can be used to limit user session count with the help of Conditional Authentication Functions. Use the below conditional authentication script.

function onInitialRequest(context) { executeStep(1, {
   onSuccess: function (context) {
       var isAllowed = isWithinSessionLimit(context, {"sessionLimit":"2"});
        if (isAllowed) {
            Log.info('Authentication Successfull ');
        }
        else {
            executeStep(2);
            Log.info('Authentication Successfull ');
        }
   }

}); }

Please note that in here ID 1 is the Basic Authenticator and ID 2 is the sessionCount Authenticator

identity-local-auth-limited-sessions's People

Contributors

ashensw avatar dimuthnc avatar emswbandara avatar inthirakumaaran avatar maheshika avatar nilasini avatar omindu avatar piraveena avatar senthalan avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.