unico 2003/12/09 09:55:13
Modified: src/blocks/slide/java/org/apache/cocoon/components/source/impl
SlideSourceFactory.java
Log:
authentication information is redundant here as its not the concern of the
source
Revision Changes Path
1.8 +6 -23
cocoon-2.1/src/blocks/slide/java/org/apache/cocoon/components/source/impl/SlideSourceFactory.java
Index: SlideSourceFactory.java
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/blocks/slide/java/org/apache/cocoon/components/source/impl/SlideSourceFactory.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- SlideSourceFactory.java 8 Dec 2003 18:06:43 -0000 1.7
+++ SlideSourceFactory.java 9 Dec 2003 17:55:13 -0000 1.8
@@ -137,29 +137,18 @@
final String query = parts[SourceUtil.QUERY];
String path = parts[SourceUtil.PATH];
- String user;
- String password;
+ String principal;
String namespace;
// parse the authority string for [usr][:[EMAIL PROTECTED]
int index = authority.indexOf('@');
if (index == -1) {
- user = "guest";
- password = null;
+ principal = "guest";
namespace = authority;
}
else {
- String userinfo = authority.substring(0,index);
+ principal = authority.substring(0,index);
namespace = authority.substring(index+1);
- index = userinfo.indexOf(':');
- if (index != -1) {
- user = userinfo.substring(0,index);
- password = userinfo.substring(index+1);
- }
- else {
- user = userinfo;
- password = null;
- }
}
@@ -180,20 +169,14 @@
if (getLogger().isDebugEnabled()) {
getLogger().debug("scheme: " + scheme);
- getLogger().debug("user: " + user);
- getLogger().debug("password: " + password);
+ getLogger().debug("principal: " + principal);
getLogger().debug("namespace: " + namespace);
getLogger().debug("path: " + path);
getLogger().debug("version: " + version);
}
SourceCredential credential;
-
- if (password!=null) {
- credential = new SourceCredential(user,password);
- } else {
- credential = new SourceCredential(user);
- }
+ credential = new SourceCredential(principal);
NamespaceAccessToken nat = m_repository.getNamespaceToken(namespace);
if (nat == null) {