Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [higgins-dev] Digital Identity and IContext open() method

Jim Sermersheim wrote:
#2 looks like the step where IContextFactory.canCreate(URI) would be
called. Do you envision #2 calling create, and then in #3 the user calls
create again?

Hmm. Could be. You're trying to get me to eat my words, aren't you? Another possibility (which admittedly is not captured by (2) and (3) below) is that the user calls IdASRegistry.getContextFactories, with a filter designed to rule out unwanted providers and/or look for specific data formats (if the user happens to know something about the underlying context). Then the user asks each factory to create an IContext, catching the exception for those who can't, and stopping with the first factory who can. (We *could* encapsulate this in an IdASRegistry.createContext method.)

The filter on getContextFactories would presumably be cheaper than canCreate, because it's simply testing the values of one or more properties.

I guess the question is whether there's a use case that would do (2) but not (3). In that case, canCreate would be useful.

...Greg



Greg Byrd <gbyrd@xxxxxxxx> 07/28/06 8:32 AM >>>
[...]
I have to admit I'm still a little confused by the current use of the term 'provider' WRT the Higgins model. Given the recent discussions it's not at all clear to me what the sequence of operations is for creating/using an IContext with a real use case. Could someone point me to example and/or junit test code that uses the API in current expected/proscribed manner?


Let me give it a try:

(1) Consumer of IdAS service (aka User) needs to get a particular Attribute value for a particular DigitalSubject, and he has the URI of a

Context that is likely to provide the required value.

(2) User contacts IdAS service and finds a ContextFactory that can handle this URI.

(3) User asks the ContextFactory to create an IContext.

(4) User queries the Context's policy (IContext.getPolicy) to determine what credentials are needed to open it.

(5) User calls IContext.open to authenticate to the Context and gain access to its data.

(6) User searches for DigitalSubject (IContext.getSubjects) and retrieves desired Attribute value (IDigitalSubject.getAttribute).

(7) User calls IContext.close to terminate use of the Context.



_______________________________________________
higgins-dev mailing list
higgins-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/higgins-dev

_______________________________________________
higgins-dev mailing list
higgins-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/higgins-dev



Back to the top