Eduard Witteveen wrote: > > public AuthenticationData getAuthentication(); > > > > > >which simply returns mmb.getMMBaseCop().getAuthentication(); > > > > > We must indeed use a String here, identifying the cloud
Well, gomez seemed to disagree. I think for the moment it does not matter much, because anyhow it is not implemented. > Why not strings? this will be a lot clearder IMHO I moved the implementation from CloudTag which used this Java way of creating enums. These are contants. You can use strings with the 'getMethod' method, to translate the string into a constant. If you like, I can move this method and the constants to the implementation and leave only a String version in the interface. > > /** > > * Several 'methods' to authenticate could be available. > > * This method converts a user-friendly string describing the 'method' > > to a integer constant which can be used in * [EMAIL PROTECTED] > > getApplications(int)}. > > * @param m A String like 'http', 'anonymous', 'loginpage', or > > 'delegatesession'. * @return An integer contant. > > */ > > int getMethod(String m); > > > > > Why do we have this method? I dont want to have integer values,... To solve your previous issue, that you liked strings better. This method could be move to the implementation, as I suggested. > > > /** > > * The security implementation can override a default method. The > > default default method (as > > * implemented in [EMAIL PROTECTED] org.mmbase.security.Authentication} > > for the > > 'http' protocol is HTTP > > * (which means that basic authentication of the http protocol can be > > used), but may not be > > * feasible for every implementation (it is e.g. useless if the > > security implementation does not have > > * name/password authentication). > > * @param protocol For which protocol or <code>null</code>, which means > > 'HTTP/1.1'. > > */ > > int getDefaultMethod(String protocol); > > > > > What is the difference between getTypes(protocol)[0]? A method is something else that a authentication type. I thought I explained it quite verbosely in the mail. The authentication method is actually a indication of the client about how she likes to do the authentication. A authentication type is one of the 'sub' implementations of authentication. If the client has no preference it can be let to the authentication by this 'getDefaultMethod'. > Parameter[] getParameters(String method); We are not going to discuss this here. A 'Parameters' object must be returned. Because when using the bridge, you alway delegate creation of new objects in this way. I think you fail to see that a Parameter is a definition of one parameter, and that Parameters is a list of actual parameter values. Actualy in Function is is called createParameters (as changed by Pierre, which I overlooked, sorry). I will rename it here too then, for concistency (which has no influence on behaviour). > > And i dont understand competely the difference between protocol / > application / method ;) protocol is e.g. http application is e.g. name/password method is e.g. loginpage > Also, when i designed the security it was possible to wrap JAAS, did you > have a peek at how they solved this? (i dont remeber how it worked) No, I did not again. I don't remember either how it worked. I didn't propose changes in security though, only a few additions to make it easier useable. So, if it was possible to wrap JAAS, I suppose it still would be. Michiel -- Michiel Meeuwissen mihxil' Mediacentrum 140 H'sum [] () +31 (0)35 6772979 nl_NL eo_XX en_US _______________________________________________ Developers mailing list [email protected] http://lists.mmbase.org/mailman/listinfo/developers
