Skip to content

Instantly share code, notes, and snippets.

View gayashanbc's full-sized avatar
:octocat:
Nothing is true, everything is permitted...

Gayashan Bombuwala gayashanbc

:octocat:
Nothing is true, everything is permitted...
View GitHub Profile
@gayashanbc
gayashanbc / index.html
Created July 22, 2018 19:00
Angular Tutorials in Sinhala | V4 of index.html
<!DOCTYPE html>
<html ng-app>
<head>
<title>Hello from AngularJS</title>
<script src="angular.min.js"></script>
</head>
<body>
<form action="">
@gayashanbc
gayashanbc / starUML.md
Created November 23, 2018 18:41 — forked from trandaison/starUML.md
Get full version of StarUML

StarUML

Download: StarUML.io

Crack

Source: jorgeancal

After installing StartUML successfully, modify LicenseManagerDomain.js as follow:

/**
@gayashanbc
gayashanbc / active-sessions-limit-handler-1.js
Created September 26, 2019 13:04
Adaptive JS Script for Active Sessions Limit Handler
// Concurrent-Session-Management from Template...
// This script will prompt concurrent session handling
// to one of the given roles
// If the user has any of the below roles, concurrent session handling will be prompted
// and it will either kill sessions or abort login based on number of active concurrent user sessions
var rolesToStepUp = ['admin', 'manager'];
var maxSessionCount = 1;
@gayashanbc
gayashanbc / deployment.toml
Created September 26, 2019 13:19
Configuring the MaxSessionCount variable in deployment.toml file
authentication.authenticator.session_handler.parameters.max_session_count = "2"
@gayashanbc
gayashanbc / active-sessions-limit-handler-2.js
Created September 26, 2019 13:25
Configuring active-sessions-limit-handler variables through deployment.toml file
// Concurrent-Session-Management from Template...
// This script will prompt concurrent session handling
// to one of the given roles
// If the user has any of the below roles, concurrent session handling will be prompted
// and it will either kill sessions or abort login based on number of active concurrent user sessions
var rolesToStepUp = ['admin', 'manager'];
var maxSessionCount = 1;
function onLoginRequest(context) {
@gayashanbc
gayashanbc / active-sessions-limit-handler-3.js
Created September 26, 2019 13:32
Limiting active user sessions using adaptive JS functions
// Concurrent-Session-Management from Template...
// This script will prompt concurrent session handling
// to one of the given roles
// If the user has any of the below roles, concurrent session handling will be prompted
// and it will either kill sessions or abort login based on number of active concurrent user sessions
var rolesToStepUp = ['admin', 'manager'];
var maxSessionCount = 1;
function onLoginRequest(context) {
@gayashanbc
gayashanbc / active-sessions-limit-handler-4.js
Created September 26, 2019 14:35
getUserSessions(user) demo
var sessions = getUserSessions(user);
for(var key in sessions) {
Log.info(sessions[key].userAgent.browser); // Print the web browser of each user session
}
@gayashanbc
gayashanbc / hazelcast.xml
Created November 18, 2019 05:52
Hazelcast config for AWS ECS
<?xml version="1.0" encoding="UTF-8"?>
<hazelcast xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-3.12.xsd"
xmlns="http://www.hazelcast.com/schema/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<network>
<interfaces enabled="true">
<interface>10.0.*.*</interface>
</interfaces>
<join>
<multicast enabled="false"/>
@gayashanbc
gayashanbc / sampleApp.properties
Created August 20, 2020 14:26
Property Configs for SampleApp
EnableSAML2SSOLogin=true
#Url to do send SAML2 SSO AuthnRequest
SAML2SSOURL=samlsso
#URIs to skip SSOAgentFilter; comma separated values
SkipURIs=
IndexPage=/SampleApp/index.html
@gayashanbc
gayashanbc / web.xml
Created August 20, 2020 14:28
web.xml of SampleApp
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2020, 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
~