Skip to content

Instantly share code, notes, and snippets.

View omindu's full-sized avatar

Omindu Rathnaweera omindu

  • Colombo, Sri Lanka
View GitHub Profile
@omindu
omindu / osgi> b 15
Last active September 3, 2017 04:07
osgi> b 15
axiom_1.2.11.wso2v10 [15]
Id=15, Status=ACTIVE Data Root=/product-is/modules/distribution/target/wso2is-5.1.0-SNAPSHOT/repository/components/default/configuration/org.eclipse.osgi/bundles/15/data
"No registered services."
No services in use.
Exported packages
org.jaxen.saxpath.base; version="1.1.1"[exported]
org.apache.axiom.om.impl.serialize; version="1.2.11.wso2v10"[exported]
org.apache.axiom.util.stax; version="1.2.11.wso2v10"[exported]
NameCallback usernameCallback = new NameCallback("username");
PasswordCallback passwordCallback = new PasswordCallback("password", false);
usernameCallback.setName("admin");
passwordCallback.setPassword(new char[]{'a', 'd', 'm', 'i', 'n'};
Callback[] callbacks = {usernameCallback, passwordCallback};
try {
//Authentication
@omindu
omindu / samlsso_notification.jsp
Last active July 12, 2016 20:55
Modified samlsso_notification.jsp to POST SAML error response to ACS URL
<%--
~ Copyright (c) 2016, 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
~
public User getUser(String uniqueUserId) throws IdentityStoreException, UserNotFoundException {
//Pre handler
Map<String, Object> eventProperties = new HashMap<>();
eventProperties.put(IdentityStoreConstants.UNIQUE_USED_ID, uniqueUserId);
Event event = new Event(IdentityStoreInterceptorConstants.PRE_GET_USER_BY_ID, eventProperties);
IdentityMgtMessageContext messageContext = new IdentityMgtMessageContext(event);
try {
<?xml version="1.0" encoding="UTF-8"?>
<!--
# Copyright 2015 WSO2 Inc. (http://wso2.org)
#
# Licensed 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
#
$ wum-dev update wso2esb-4.9.0 1077
Connecting to WSO2 Update...
Updating wso2esb-4.9.0...
165 released updates and 1 update(s) in testing state are available
45 already downloaded, 121 to download
Verifying downloaded updates...
Downloading updates... [0/121]
unexpected fault address 0x6a01c14660aa
fatal error: fault
@omindu
omindu / buildAllExtensions.sh
Last active August 5, 2017 20:20 — forked from pulasthi7/buildAllExtensions.sh
Clones all the IS extensions repos
echo "building framework"
cd identity-framework
mvn clean install -Dmaven.test.skip=true
if [ $? -ne 0 ]
then
cd ..
echo Build failed at identity-framework
notify-send "Build failed at identity-framework"
exit 1
else
package sample.extended.saml.authenticator;
import org.wso2.carbon.identity.application.authentication.framework.FederatedApplicationAuthenticator;
import org.wso2.carbon.identity.application.authentication.framework.context.AuthenticationContext;
import org.wso2.carbon.identity.application.authentication.framework.exception.AuthenticationFailedException;
import org.wso2.carbon.identity.application.authentication.framework.exception.LogoutFailedException;
import org.wso2.carbon.identity.application.authentication.framework.util.FrameworkUtils;
import org.wso2.carbon.identity.application.authenticator.samlsso.SAMLSSOAuthenticator;
import java.util.Map;
[2018-05-10 00:38:58,161] DEBUG {org.wso2.carbon.identity.application.authentication.framework.handler.request.impl.DefaultRequestCoordinator} - retrieving authentication request from cache..
[2018-05-10 00:38:58,164] DEBUG {org.wso2.carbon.identity.application.authentication.framework.util.FrameworkUtils} -
Inbound Request parameters:
commonAuthCallerPath={/passivests}
forceAuth={false}
passiveAuth={false}
relyingParty={PassiveSTSSampleApp2}
tenantDomain={example.com}
wa={wsignin1.0}
wreply={http://localhost:8080/PassiveSTSSampleApp}
@omindu
omindu / commands
Created June 19, 2018 15:56 — forked from pulasthi7/commands
maven
mvn versions:update-properties -Dincludes=org.wso2.carbon.identity.* -DgenerateBackupPoms=false
mvn versions:update-properties -DgenerateBackupPoms=false -Dincludes=org.wso2.carbon.identity.*,org.wso2.carbon.extension.identity.*,org.wso2.charon,org.apache.rampart.wso2,org.apache.ws.security.wso2,org.wso2.carbon.consent.*,org.wso2.carbon.database.utils -U
//Run in release profile with signing disabled
mvn clean install -P wso2-release -Dgpg.skip
mvn versions:set -DnewVersion=1.0.8-SNAPSHOT