Revision 6544
Added by ben leinfelder about 13 years ago
lib/style/skins/dataone/performMapping.jsp | ||
---|---|---|
61 | 61 |
String tokenURL = portalURL + "?action=isAuthenticated&token=" + token; |
62 | 62 |
InputStream tokenInputStream = new URL(tokenURL).openStream(); |
63 | 63 |
String tokenContent = IOUtils.toString(tokenInputStream, "UTF-8"); |
64 |
tokenContent = tokenContent.trim(); |
|
64 | 65 |
boolean isD1SessionValid = Boolean.parseBoolean(tokenContent); |
65 | 66 |
|
66 | 67 |
// look up the D1 subject |
67 | 68 |
String subjectURL = portalURL + "?action=getSubject&token=" + token; |
68 | 69 |
InputStream subjectStream = new URL(subjectURL).openStream(); |
69 | 70 |
primarySubject = IOUtils.toString(subjectStream, "UTF-8"); |
71 |
primarySubject = primarySubject.trim(); |
|
70 | 72 |
|
71 | 73 |
// call the mapping method as the MN |
72 | 74 |
if (isMetacatSessionValid && isD1SessionValid) { |
73 | 75 |
Session mnSession = new Session(); |
74 | 76 |
mnSession.setSubject(MNodeService.getInstance(request).getCapabilities().getSubject(0)); |
75 | 77 |
// TODO: set up the certificate for this node |
78 |
mnSession = null; |
|
76 | 79 |
Subject s1 = new Subject(); |
77 | 80 |
s1.setValue(primarySubject); |
78 | 81 |
Subject s2 = new Subject(); |
... | ... | |
85 | 88 |
%> |
86 | 89 |
Mapping set from <%=primarySubject %> to <%=secondarySubject %> |
87 | 90 |
<% |
91 |
} else { |
|
92 |
%> |
|
93 |
Could not set mapping set from <%=primarySubject %> to <%=secondarySubject %> |
|
94 |
<% |
|
88 | 95 |
} |
89 | 96 |
%> |
Also available in: Unified diff
use null session for now