You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by ju...@apache.org on 2002/02/26 09:49:32 UTC
cvs commit: jakarta-slide/src/share/org/apache/slide/authenticate CredentialsToken.java
juergen 02/02/26 00:49:32
Modified: src/share/org/apache/slide/authenticate
CredentialsToken.java
Log:
cache principal instance and added getPrincipal method. Because I need the principal in the stores (Eckehard)
Revision Changes Path
1.5 +30 -17 jakarta-slide/src/share/org/apache/slide/authenticate/CredentialsToken.java
Index: CredentialsToken.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/authenticate/CredentialsToken.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- CredentialsToken.java 25 Nov 2000 01:34:48 -0000 1.4
+++ CredentialsToken.java 26 Feb 2002 08:49:32 -0000 1.5
@@ -1,13 +1,13 @@
/*
- * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/authenticate/CredentialsToken.java,v 1.4 2000/11/25 01:34:48 remm Exp $
- * $Revision: 1.4 $
- * $Date: 2000/11/25 01:34:48 $
+ * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/authenticate/CredentialsToken.java,v 1.5 2002/02/26 08:49:32 juergen Exp $
+ * $Revision: 1.5 $
+ * $Date: 2002/02/26 08:49:32 $
*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * Copyright (c) 1999 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -15,7 +15,7 @@
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
@@ -23,15 +23,15 @@
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowlegement:
- * "This product includes software developed by the
+ * any, must include the following acknowlegement:
+ * "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
- * from this software without prior written permission. For written
+ * from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache"
@@ -59,7 +59,7 @@
*
* [Additional notices, if required by prior licensing conditions]
*
- */
+ */
package org.apache.slide.authenticate;
@@ -68,7 +68,7 @@
/**
* Credentials token class.
- *
+ *
* @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
*/
public final class CredentialsToken {
@@ -79,7 +79,7 @@
/**
* Constructor.
- *
+ *
* @param credentials Credentials stored in this token
*/
public CredentialsToken(String credentials) {
@@ -90,17 +90,22 @@
/**
* Constructor.
- *
+ *
* @param credentials Credentials stored in this token
*/
public CredentialsToken(Principal principal) {
this.credentials = principal.getName();
this.trusted = true;
+ this.principal = principal;
}
// ----------------------------------------------------- Instance Variables
+ /**
+ * principal instance.
+ */
+ private Principal principal;
/**
* Credentials, or principal.
@@ -119,7 +124,7 @@
/**
* Is this credentials token to be trusted ?
- *
+ *
* @return boolean
*/
public boolean isTrusted() {
@@ -129,19 +134,27 @@
/**
* Returns the private credentials.
- *
- * @return String
+ *
+ * @return String
*/
public String getPrivateCredentials() {
// FIXME ?
return credentials;
}
+ /**
+ * Returns the current principal
+ *
+ * @return java.security.Principal
+ */
+ public Principal getPrinipal() {
+ return principal;
+ }
/**
* Returns the public creddentials.
- *
- * @return String
+ *
+ * @return String
*/
public String getPublicCredentials() {
return credentials;
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: cvs commit: jakarta-slide/src/share/org/apache/slide/authenticate CredentialsToken.java
Posted by Remy Maucherat <re...@apache.org>.
> 26.02.2002 09:49:32, juergen@apache.org wrote:
> >juergen 02/02/26 00:49:32
> >
> > Modified: src/share/org/apache/slide/authenticate
> > CredentialsToken.java
> > Log:
> > cache principal instance and added getPrincipal method. Because I
> > need the principal in the stores (Eckehard)
>
> [snip]
> > + /**
> > + * Returns the current principal
> > + *
> > + * @return java.security.Principal
> > + */
> > + public Principal getPrinipal() {
> > + return principal;
> > + }
>
> Ermmm, that should be getPrincipal() instead of getPrinipal(), I'm
> sure (focus on the missing 'c').
> :o)
>
> > /**
> > * Returns the public creddentials.
> > - *
> > - * @return String
> > + *
> > + * @return String
> > */
> > public String getPublicCredentials() {
> > return credentials;
>
> Why is it that the commits coming from you guys always report plenty
> of 'invisible' changes, like removed whitespace at end of line etc.
> It makes looking at the diffs really cumbersome. Would it be possible
> to turn that off (assuming it's being done automatically by your
> favorite editor) ?
My original sources did contain tabs. Apparently Juergen's editor converts
the tabs to spaces (hopefully, it's not the other way around ;-)), which is
good in some ways, but isn't too good an idea.
If we want to get rid of tabs, we should do it all at once, IMO. Otherwise,
it makes the diffs really annoying to deal with, as Christopher pointed out.
Remy
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: cvs commit: jakarta-slide/src/share/org/apache/slide/authenticate CredentialsToken.java
Posted by Christopher Lenz <cm...@gmx.de>.
26.02.2002 09:49:32, juergen@apache.org wrote:
>juergen 02/02/26 00:49:32
>
> Modified: src/share/org/apache/slide/authenticate
> CredentialsToken.java
> Log:
> cache principal instance and added getPrincipal method. Because I
> need the principal in the stores (Eckehard)
[snip]
> + /**
> + * Returns the current principal
> + *
> + * @return java.security.Principal
> + */
> + public Principal getPrinipal() {
> + return principal;
> + }
Ermmm, that should be getPrincipal() instead of getPrinipal(), I'm
sure (focus on the missing 'c').
:o)
> /**
> * Returns the public creddentials.
> - *
> - * @return String
> + *
> + * @return String
> */
> public String getPublicCredentials() {
> return credentials;
Why is it that the commits coming from you guys always report plenty
of 'invisible' changes, like removed whitespace at end of line etc.
It makes looking at the diffs really cumbersome. Would it be possible
to turn that off (assuming it's being done automatically by your
favorite editor) ?
-chris
________________________________________________________________
cmlenz at gmx.de
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>