Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SAML SSO apps with profile view #77

Merged
merged 1 commit into from
Aug 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@

#add default
EnableSAML2SSOLogin=true
EnableOpenIDLogin=false
EnableOAuth2SAML2Grant=false
#OAuth2.ClientId=(enter the client id received at the application registration)
#OAuth2.ClientSecret= (enter the client secret received at the application registration)

#Url to do send SAML2 SSO AuthnRequest
SAML2SSOURL=samlsso
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
-->
<%@ page import="org.wso2.carbon.identity.sso.agent.bean.LoggedInSessionBean" %>
<%@ page import="org.wso2.carbon.identity.sso.agent.util.SSOAgentConstants" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.Map" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html lang="en">
Expand Down Expand Up @@ -53,10 +55,9 @@

<%
String subjectId = null;

Map<String, String> saml2SSOAttributes = null;
final String SAML_SSO_URL = "samlsso";
final String SAML_LOGOUT_URL = "logout";

// if web-browser session is there but no session bean set,
// invalidate session and direct back to login page
if (request.getSession(false) != null
Expand All @@ -70,9 +71,9 @@
return;
}
LoggedInSessionBean sessionBean = (LoggedInSessionBean) session.getAttribute(SSOAgentConstants.SESSION_BEAN_NAME);

if (sessionBean != null && sessionBean.getSAML2SSO() != null) {
if(sessionBean != null && sessionBean.getSAML2SSO() != null) {
subjectId = sessionBean.getSAML2SSO().getSubjectId();
saml2SSOAttributes = sessionBean.getSAML2SSO().getSubjectAttributes();
} else {
%>
<script type="text/javascript">
Expand All @@ -81,6 +82,7 @@
<%
return;
}

%>

<body class="swift">
Expand All @@ -101,10 +103,11 @@
<li class="dropdown user-name">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<img class="img-circle" height="30" width=30" src="img/Admin-icon.jpg"> <span
class="user-name"><%=subjectId%>@pickup.com <i class="fa fa-chevron-down"></i></span>
class="user-name"><%=subjectId%> <i class="fa fa-chevron-down"></i></span>
</a>
<ul class="dropdown-menu" role="menu">
<li><a href=<%=SAML_LOGOUT_URL%>>Logout</a></li>
<li><a href="profile.jsp">Profile</a></li>
</ul>
</li>
</ul>
Expand Down Expand Up @@ -221,7 +224,7 @@
<div class="row">
<div class="col-xs-12">
<a href="http://wso2.com/" target="_blank"><img src="img/wso2logo.svg" height="20"/></a>
<p>Copyright &copy; <a href="http://wso2.com/" target="_blank">WSO2</a> 2017</p>
<p>Copyright &copy; <a href="http://wso2.com/" target="_blank">WSO2</a> 2018</p>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,19 +218,19 @@ footer {
padding-top: 50px
}
#login .form-wrap {
width: 30%;
width: 40%;
margin: 0 auto;
background: #eee;
padding: 20px;
border-radius: 5px;
padding-top: 20px;
}
#login h1 {
color: #025678;
font-size: 18px;
text-align: center;
font-weight: bold;
padding-bottom: 20px;
.login-text {
font-size: 30px;
color: #444;
vertical-align: middle;
}

#login .form-group {
margin-bottom: 25px;
}
Expand Down Expand Up @@ -291,6 +291,22 @@ footer {
color: #fff;
}

/* --------------------------------------------------
:: Profile section
-------------------------------------------------- */

.product-box{
background-repeat:repeat-x;
background-position:0 0;
border:solid 1px #ececec;
background-color:#fff;
margin-top:10px;
padding:1em;
margin-bottom:40px;
color:#535353;
line-height:30px;
}

/* --------------------------------------------------
:: Footer
-------------------------------------------------- */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
-->
<%@ page import="org.wso2.carbon.identity.sso.agent.bean.LoggedInSessionBean" %>
<%@ page import="org.wso2.carbon.identity.sso.agent.util.SSOAgentConstants" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.Map" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html lang="en">
Expand Down Expand Up @@ -53,10 +55,9 @@

<%
String subjectId = null;

Map<String, String> saml2SSOAttributes = null;
final String SAML_SSO_URL = "samlsso";
final String SAML_LOGOUT_URL = "logout";

// if web-browser session is there but no session bean set,
// invalidate session and direct back to login page
if (request.getSession(false) != null
Expand All @@ -70,9 +71,9 @@
return;
}
LoggedInSessionBean sessionBean = (LoggedInSessionBean) session.getAttribute(SSOAgentConstants.SESSION_BEAN_NAME);

if (sessionBean != null && sessionBean.getSAML2SSO() != null) {
if(sessionBean != null && sessionBean.getSAML2SSO() != null) {
subjectId = sessionBean.getSAML2SSO().getSubjectId();
saml2SSOAttributes = sessionBean.getSAML2SSO().getSubjectAttributes();
} else {
%>
<script type="text/javascript">
Expand All @@ -81,6 +82,7 @@
<%
return;
}

%>

<body class="swift">
Expand All @@ -101,10 +103,11 @@
<li class="dropdown user-name">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<img class="img-circle" height="30" width=30" src="img/Admin-icon.jpg"> <span
class="user-name"><%=subjectId%>@pickup.com <i class="fa fa-chevron-down"></i></span>
class="user-name"><%=subjectId%><i class="fa fa-chevron-down"></i></span>
</a>
<ul class="dropdown-menu" role="menu">
<li><a href=<%=SAML_LOGOUT_URL%>>Logout</a></li>
<li><a href="profile.jsp">Profile</a></li>
</ul>
</li>
</ul>
Expand Down Expand Up @@ -229,7 +232,7 @@
<div class="row">
<div class="col-xs-12">
<a href="http://wso2.com/" target="_blank"><img src="img/wso2logo.svg" height="20"/></a>
<p>Copyright &copy; <a href="http://wso2.com/" target="_blank">WSO2</a> 2017</p>
<p>Copyright &copy; <a href="http://wso2.com/" target="_blank">WSO2</a> 2018</p>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
-->
<%@ page import="org.wso2.carbon.identity.sso.agent.bean.LoggedInSessionBean" %>
<%@ page import="org.wso2.carbon.identity.sso.agent.util.SSOAgentConstants" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.Map" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html lang="en">
Expand Down Expand Up @@ -53,10 +55,9 @@

<%
String subjectId = null;

Map<String, String> saml2SSOAttributes = null;
final String SAML_SSO_URL = "samlsso";
final String SAML_LOGOUT_URL = "logout";

// if web-browser session is there but no session bean set,
// invalidate session and direct back to login page
if (request.getSession(false) != null
Expand All @@ -70,9 +71,9 @@
return;
}
LoggedInSessionBean sessionBean = (LoggedInSessionBean) session.getAttribute(SSOAgentConstants.SESSION_BEAN_NAME);

if (sessionBean != null && sessionBean.getSAML2SSO() != null) {
if(sessionBean != null && sessionBean.getSAML2SSO() != null) {
subjectId = sessionBean.getSAML2SSO().getSubjectId();
saml2SSOAttributes = sessionBean.getSAML2SSO().getSubjectAttributes();
} else {
%>
<script type="text/javascript">
Expand All @@ -81,6 +82,7 @@
<%
return;
}

%>

<body class="swift">
Expand All @@ -101,10 +103,11 @@
<li class="dropdown user-name">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<img class="img-circle" height="30" width=30" src="img/Admin-icon.jpg"> <span
class="user-name"><%=subjectId%>@pickup.com <i class="fa fa-chevron-down"></i></span>
class="user-name"><%=subjectId%> <i class="fa fa-chevron-down"></i></span>
</a>
<ul class="dropdown-menu" role="menu">
<li><a href=<%=SAML_LOGOUT_URL%>>Logout</a></li>
<li><a href="profile.jsp">Profile</a></li>
</ul>
</li>
</ul>
Expand Down Expand Up @@ -190,7 +193,7 @@
<div class="row">
<div class="col-xs-12">
<a href="http://wso2.com/" target="_blank"><img src="img/wso2logo.svg" height="20"/></a>
<p>Copyright &copy; <a href="http://wso2.com/" target="_blank">WSO2</a> 2017</p>
<p>Copyright &copy; <a href="http://wso2.com/" target="_blank">WSO2</a> 2018</p>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@
<div class="container">
<div class="row">
<div class="col-xs-12">
<div class="form-wrap">
<img src="img/logo.png" class="center-block" height="60"/>
<!--<h1 class="pickup-primary-color">Log in with your email account</h1>-->
<div class="form-wrap" style="text-align: center;">
<img src="img/logo.png" height style="max-height: 65px;"/>
<span class="login-text">Dispatch </span>
</br>
<form role="form" action="samlsso"
method="post" id="login-form" autocomplete="off">
Expand All @@ -89,7 +89,7 @@
<div class="row">
<div class="col-xs-12">
<a href="http://wso2.com/" target="_blank" ><img src="img/wso2logo.svg" height="20" /></a>
<p>Copyright &copy; <a href="http://wso2.com/" target="_blank">WSO2</a> 2017</p>
<p>Copyright &copy; <a href="http://wso2.com/" target="_blank">WSO2</a> 2018</p>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
-->
<%@ page import="org.wso2.carbon.identity.sso.agent.bean.LoggedInSessionBean" %>
<%@ page import="org.wso2.carbon.identity.sso.agent.util.SSOAgentConstants" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.Map" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html lang="en">
Expand Down Expand Up @@ -53,10 +55,9 @@

<%
String subjectId = null;

Map<String, String> saml2SSOAttributes = null;
final String SAML_SSO_URL = "samlsso";
final String SAML_LOGOUT_URL = "logout";

// if web-browser session is there but no session bean set,
// invalidate session and direct back to login page
if (request.getSession(false) != null
Expand All @@ -70,9 +71,9 @@
return;
}
LoggedInSessionBean sessionBean = (LoggedInSessionBean) session.getAttribute(SSOAgentConstants.SESSION_BEAN_NAME);

if (sessionBean != null && sessionBean.getSAML2SSO() != null) {
if(sessionBean != null && sessionBean.getSAML2SSO() != null) {
subjectId = sessionBean.getSAML2SSO().getSubjectId();
saml2SSOAttributes = sessionBean.getSAML2SSO().getSubjectAttributes();
} else {
%>
<script type="text/javascript">
Expand All @@ -81,6 +82,7 @@
<%
return;
}

%>

<body class="swift">
Expand All @@ -101,10 +103,11 @@
<li class="dropdown user-name">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<img class="img-circle" height="30" width=30" src="img/Admin-icon.jpg"> <span
class="user-name"><%=subjectId%>@pickup.com <i class="fa fa-chevron-down"></i></span>
class="user-name"><%=subjectId%><i class="fa fa-chevron-down"></i></span>
</a>
<ul class="dropdown-menu" role="menu">
<li><a href=<%=SAML_LOGOUT_URL%>>Logout</a></li>
<li><a href="profile.jsp">Profile</a></li>
</ul>
</li>
</ul>
Expand Down Expand Up @@ -208,7 +211,7 @@
<div class="row">
<div class="col-xs-12">
<a href="http://wso2.com/" target="_blank"><img src="img/wso2logo.svg" height="20"/></a>
<p>Copyright &copy; <a href="http://wso2.com/" target="_blank">WSO2</a> 2017</p>
<p>Copyright &copy; <a href="http://wso2.com/" target="_blank">WSO2</a> 2018</p>
</div>
</div>
</div>
Expand Down
Loading