Revision 7390
Added by ben leinfelder about 12 years ago
index.jsp | ||
---|---|---|
1 | 1 |
<%@ page language="java"%> |
2 |
<%@page import="org.dataone.client.D1Client"%> |
|
3 |
<%@page import="java.net.URL"%> |
|
2 | 4 |
<% |
3 | 5 |
/** |
4 | 6 |
* '$RCSfile$' |
... | ... | |
34 | 36 |
<%@page import="edu.ucsb.nceas.metacat.service.SessionService"%> |
35 | 37 |
<% |
36 | 38 |
|
39 |
//get the CN environment, dynamically |
|
40 |
String cnURL = D1Client.getCN().getNodeBaseServiceUrl(); |
|
41 |
String portalURL = cnURL.substring(0, cnURL.lastIndexOf(new URL(cnURL).getPath())) + "/portal"; |
|
42 |
//String portalURL = "https://cn.dataone.org/portal"; |
|
43 |
|
|
37 | 44 |
// what was the given DataONE identity? |
38 | 45 |
String d1Identity = request.getParameter("d1Identity"); |
39 | 46 |
String token = request.getParameter("token"); |
... | ... | |
113 | 120 |
<br/> |
114 | 121 |
|
115 | 122 |
Will be mapped to this DataONE account*: |
116 |
<iframe id="subjectFrame" frameborder="0" marginwidth="0" height="30" width="100%" src="https://cn-dev.dataone.org/portal/identity?action=getSubject">
|
|
123 |
<iframe id="subjectFrame" frameborder="0" marginwidth="0" height="30" width="100%" src="<%=portalURL %>/identity?action=getSubject">
|
|
117 | 124 |
</iframe> |
118 | 125 |
|
119 | 126 |
<hr/> |
120 | 127 |
|
121 | 128 |
1. Use this temporary DataONE token*: |
122 |
<iframe id="tokenFrame" frameborder="0" marginwidth="0" height="30" width="100%" src="https://cn-dev.dataone.org/portal/identity?action=getToken">
|
|
129 |
<iframe id="tokenFrame" frameborder="0" marginwidth="0" height="30" width="100%" src="<%=portalURL %>/identity?action=getToken">
|
|
123 | 130 |
</iframe> |
124 | 131 |
<br/> |
125 | 132 |
|
... | ... | |
140 | 147 |
*If you do not see your DataONE account or DataONE token here, then you must first authenticate using CILogon. |
141 | 148 |
</p> |
142 | 149 |
<p> |
143 |
<a href="https://cn-dev.dataone.org/portal/startRequest?target=<%=STYLE_SKINS_URL%>/dataone/index.jsp">Begin Login</a>
|
|
150 |
<a href="<%=portalURL %>/startRequest?target=<%=STYLE_SKINS_URL%>/dataone/index.jsp">Begin Login</a>
|
|
144 | 151 |
</p> |
145 | 152 |
</div> |
146 | 153 |
|
Also available in: Unified diff
look up CN url for portal servlet instead of hardcoding it.