Skip to content

Instantly share code, notes, and snippets.

@mifrazmurthaja
mifrazmurthaja / 5.10-retry.jsp
Last active September 1, 2021 14:40
5.10-retry.jsp
<%--
~ Copyright (c) 2014, 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
~
@mifrazmurthaja
mifrazmurthaja / 5.11-retry.jsp
Last active September 1, 2021 14:33
5.11-retry.jsp
<%--
~ Copyright (c) 2014, 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
~
@mifrazmurthaja
mifrazmurthaja / retry-do-js.js
Created February 9, 2021 17:20
retry-do-js.js
<script>
function startTimer(duration, display) {
var timer = duration,
minutes, seconds;
setInterval(function() {
minutes = parseInt(timer / 60, 10);
seconds = parseInt(timer % 60, 10);
minutes = minutes < 10 ? "0" + minutes : minutes;
seconds = seconds < 10 ? "0" + seconds : seconds;
@mifrazmurthaja
mifrazmurthaja / retry-do-elem-updated.html
Created February 9, 2021 17:16
retry-do-elem-updated.html
<div class="ui segment">
<% if (errorCode != null && errorCode.equals("17003")) {%>
<span class="mainIcons mainIcon4"></span>
<h3 class="title">Sorry, your account is locked</h3>
<p class="infoText">
You have entered your password wrong more than
<%=maxfailedAttempts%> times. You will have to wait for
<span id="time"></span> to continue.
</p>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 form-group">
@mifrazmurthaja
mifrazmurthaja / retry-do-elem-existing.html
Created February 9, 2021 17:15
retry-do-elem-existing.html
<div class="ui segment">
<div class="segment-form">
<div class="ui visible negative message">
<div class="header"><%=Encode.forHtmlContent(stat)%></div>
<p><%=Encode.forHtmlContent(statusMessage)%></p>
</div>
</div>
</div>
@mifrazmurthaja
mifrazmurthaja / retry-do-import.jsp
Last active September 1, 2021 14:41
retry-do-import.jsp
<%@ page import="org.wso2.carbon.idp.mgt.IdentityProviderManager" %>
<%@ page import="org.wso2.carbon.utils.multitenancy.MultitenantUtils" %>
<%@ page import="org.wso2.carbon.identity.application.common.model.IdentityProvider" %>
<%@ page import="org.wso2.carbon.identity.application.common.model.IdentityProviderProperty" %>
<%@ page import="org.wso2.carbon.context.PrivilegedCarbonContext" %>
<%@ page import="org.wso2.carbon.identity.core.util.IdentityTenantUtil" %>
<%@ page import="org.wso2.carbon.user.core.service.RealmService" %>
<%@ page import="org.wso2.carbon.user.core.UserStoreManager" %>
<%@ page import="org.wso2.carbon.user.api.UserRealm" %>
<%@ page import="java.util.Map" %>
Field Description Default Value Sample Value
Relying Party The name of the relying party. This will be needed when we perform authentication request. zendesk
Endpoint API The endpoint where the JWT response should be sent to after authenticating the user. In the Zendesk application it should be in the format of {SITE_URL}/access/jwt https://subdomain.zendesk.com/access/jwt
API Key The API Key used to sign the JWT token which we've obtained earlier from the Admin Portal of Zendesk. xxx...xxx
JWT Token Expiration Period The token expiration (exp) to set since the token was generated in seconds. 120 60
JWT Signing Algorithm The JWS Algorithm used to sign the token. HS256 Supported Algorithms: HS256/ HS384 / HS512
Redirect URL Regex The regex to validate the Redirect URL. https://subdomain.zendesk.com/*
Error URL Regex The regex to validate the Error URL. Zendesk does support providing Error URL
Logou
Field Description Default Value Sample Value
Relying Party The name of the relying party. This will be needed when we perform authentication request. lms-test-app
Endpoint API The endpoint where the JWT response should be sent to after authenticating the user. In the Thinkific LMS it should be in the format of {SITE_URL}/api/sso/v2/sso/jwt https://your-school.thinkific.com/api/sso/v2/sso/jwt
API Key The API Key used to sign the JWT token which we've obtained earlier from the Admin Portal of Thinkific. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
JWT Token Expiration Period The token expiration (exp) to set since the token was generated in seconds. 120 60
JWT Signing Algorithm The JWS Algorithm used to sign the token. HS256 Supported Algorithms: HS256/ HS384 / HS512
Redirect URL Regex The regex to validate the Redirect URL. https://your-school.thinkific.com/.*
Error URL Regex The regex to validate the Error URL. h
loggers = AUDIT_LOG, trace-messages, .. , org-wso2-carbon-identity-sso-jwt
logger.org-wso2-carbon-identity-sso-jwt.name=org.wso2.carbon.identity.sso.jwt
logger.org-wso2-carbon-identity-sso-jwt.level=DEBUG