grouper-users - Re: [grouper-users] RE: Attestation question
Subject: Grouper Users - Open Discussion List
List archive
- From: Tom Zeller <>
- To: Nathan Kopp <>
- Cc: "" <>
- Subject: Re: [grouper-users] RE: Attestation question
- Date: Fri, 6 May 2011 14:52:17 -0500
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=AKAefbx6tUKHg2dgfHSIIScApD8Uoc2gEC6aVlH6Mr40l15eLLNAnfKoHOISV1ECfp ULh0CthKQo2/vM2GxQIXW1o8HteHUEJZuE0FOYzdwSLdSjRyeF4UwCxkeDmyne9x/R3L iuOKUmxS+EeMZZ9k5J3NQAF7WdKYT3FmRIzw0=
>> I haven’t really discovered a consistent pattern that would help me to
>> understand the proper ways to use sessions.
>
> Anyways, as a rule you should start a GrouperSession as who you want to act
> as, either a regular subject or GrouperSystem.
>
> Another complication is things are only well defined for the UI, WS, and
> client. The API is a free-for-all, which is why you are confused...
I, too, have wondered how to use grouper sessions properly in the API.
The data connector plugins for the shibboleth attribute resolver
re-use a private GrouperSession instance per DataConnector, which then
uses callbacks :
public class SomethingThatUsesSessions {
private GrouperSession grouperSession;
public GrouperSession getGrouperSession() throws {
if (grouperSession == null) {
grouperSession = GrouperSession.start(subject, false);
}
return grouperSession;
}
public void doSomething() {
GrouperSession.callbackGrouperSession(
getGrouperSession(), new GrouperSessionHandler() {
public void callback(GrouperSession grouperSession) throws
GrouperSessionException {
...do something...
I chose not to use ThreadLocals because each class using a
GrouperSession may have a different subject, i.e. a different user.
TomZ
- [grouper-users] Attestation question, Nathan Kopp, 05/04/2011
- [grouper-users] RE: Attestation question, Chris Hyzer, 05/05/2011
- [grouper-users] RE: Attestation question, Nathan Kopp, 05/05/2011
- [grouper-users] RE: Attestation question, Chris Hyzer, 05/05/2011
- [grouper-users] RE: Attestation question, Nathan Kopp, 05/05/2011
- [grouper-users] RE: Attestation question, Nathan Kopp, 05/05/2011
- [grouper-users] RE: Attestation question, Nathan Kopp, 05/06/2011
- [grouper-users] RE: Attestation question, Chris Hyzer, 05/06/2011
- Re: [grouper-users] RE: Attestation question, Tom Zeller, 05/06/2011
- RE: [grouper-users] RE: Attestation question, Nathan Kopp, 05/06/2011
- RE: [grouper-users] RE: Attestation question, Chris Hyzer, 05/06/2011
- [grouper-users] RE: Attestation question, Nathan Kopp, 05/06/2011
- [grouper-users] RE: Attestation question, Nathan Kopp, 05/05/2011
- [grouper-users] RE: Attestation question, Nathan Kopp, 05/05/2011
- [grouper-users] RE: Attestation question, Chris Hyzer, 05/05/2011
- [grouper-users] RE: Attestation question, Nathan Kopp, 05/05/2011
- [grouper-users] RE: Attestation question, Chris Hyzer, 05/05/2011
Archive powered by MHonArc 2.6.16.