Re: [openid4java] org.openid4java.message.MessageException: 0x100: Namespace declaration for extension http://openid.net/sreg/1.0 MUST be signed

132 views
Skip to first unread message

Johnny Bufu

unread,
May 8, 2013, 3:13:42 AM5/8/13
to openi...@googlegroups.com
What version of the library are you using? And how are you building the
extension and adding it to the response message?

Johnny

On 13-05-07 07:37 AM, Ognjen Bubalo wrote:
> Hi,
>
> I am creating a Provider and a Consumer too.
> I get this exception in the Consumer when I try to get the SRegResponse
> sent by the Provider.
>
>
> WARNING: org.openid4java.message.MessageException: 0x100: Namespace
> declaration for extension http://openid.net/sreg/1.0 MUST be signed
> at org.openid4java.message.Message.getExtension(Message.java:494)
>
> Can you tell me what should I do on the Provider side?
>
> After adding the extension I am calling the manager.sign((AuthSuccess)
> messageResponse);
>
> Thank you!
>
> Ogi
>
> --
> You received this message because you are subscribed to the Google
> Groups "OpenID4Java" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to openid4java...@googlegroups.com.
> To post to this group, send email to openi...@googlegroups.com.
> Visit this group at http://groups.google.com/group/openid4java?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Ognjen Bubalo

unread,
May 8, 2013, 3:24:34 AM5/8/13
to openi...@googlegroups.com
Hi Johnny,

Thanks for the response.
I am using 0.9.7.

I am building it like this:

authReq = AuthRequest.createAuthRequest(parameterList, manager.getRealmVerifier());
messageResponse = manager.authResponse(parameterList, userSelectedId, userSelectedClaimedId, isAuthenticated(httpRequest), false);

if (authReq.hasExtension(SRegMessage.OPENID_NS_SREG))
 {
       MessageExtension extensionRequestObject = authReq.getExtension(SRegMessage.OPENID_NS_SREG);

                        if (extensionRequestObject instanceof SRegRequest)
                        {
                            Map<String, String> registrationData = new HashMap<String, String>();
                            SRegRequest sregReq = (SRegRequest) extensionRequestObject;
                            SRegResponse sregResp = SRegResponse.createSRegResponse(sregReq, registrationData);

                            sregResp.addAttribute("email", "te...@test.test");
                            messageResponse.addExtension(sregResp);
      }
 }

                   
manager.sign((AuthSuccess) messageResponse);

Thank you,
Ogi

Shengche Hsiao

unread,
May 8, 2013, 4:04:43 AM5/8/13
to openi...@googlegroups.com
Hello

Did you declare the ServerManager as static?
--

----------------------------------------------------------------------->
We do this not because it is easy. We do this because it is hard.
----------------------------------------------------------------------->
ShengChe Hsiao
----------------------------------------------------------------------->
fron...@gmail.com
fron...@tc.edu.tw
----------------------------------------------------------------------->

Ognjen Bubalo

unread,
May 8, 2013, 4:35:02 AM5/8/13
to openi...@googlegroups.com
Hi,

Yes.

One more thing I have found is that openid4java-server-0.9.5 and openid4java-nodeps-0.9.5 are packaged in my war. However I declared the dependency like this:
               
                <groupId>org.openid4java</groupId>
                <artifactId>openid4java</artifactId>
                <version>0.9.7</version>

in my pom.

Shengche Hsiao

unread,
May 8, 2013, 8:56:28 PM5/8/13
to openi...@googlegroups.com
Dear Bubalo

try change this code snipe


messageResponse = manager.authResponse(parameterList, userSelectedId, userSelectedClaimedId, isAuthenticated(httpRequest), false);

to

messageResponse = manager.authResponse(parameterList, userSelectedId, userSelectedClaimedId, isAuthenticated(httpRequest), true);

Ognjen Bubalo

unread,
May 9, 2013, 4:23:05 AM5/9/13
to openi...@googlegroups.com
Hi Shengche Hsiao,

I tried it, but did not help.

Thanks,
Ogi

ShengChe Hsiao

unread,
May 9, 2013, 9:26:05 AM5/9/13
to openi...@googlegroups.com
Hi Bubalo

Maybe you can give me your source code, I'll check it!
Or publish your op on the web, I'll test for it.

Or you should check you rp with myopenid account, first!

Johnny Bufu

unread,
May 9, 2013, 11:43:20 AM5/9/13
to openi...@googlegroups.com, Ognjen Bubalo

On 13-05-08 01:35 AM, Ognjen Bubalo wrote:
> One more thing I have found is that openid4java-server-0.9.5 and
> openid4java-nodeps-0.9.5 are packaged in my war. However I declared the
> dependency like this:
>
> <groupId>org.openid4java</groupId>
> <artifactId>openid4java</artifactId>
> <version>0.9.7</version>

Can you please confirm that the problem is still happening with 0.9.7?


Johnny

ShengChe Hsiao

unread,
May 9, 2013, 6:28:07 PM5/9/13
to openi...@googlegroups.com

Hello Jhonny
I used version 0.9.7 , it's ok.

--
You received this message because you are subscribed to the Google Groups "OpenID4Java" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openid4java+unsubscribe@googlegroups.com.

Johnny Bufu

unread,
May 9, 2013, 6:47:16 PM5/9/13
to openi...@googlegroups.com
Ok, so 0.9.7 signs everything correctly and there's no problem with it,
am I understanding correctly? (And the problem was only pre-0.9.7?)

Thanks!
Johnny

On 13-05-09 03:28 PM, ShengChe Hsiao wrote:
> Hello Jhonny
> I used version 0.9.7 , it's ok.
>
> On May 9, 2013 11:43 PM, "Johnny Bufu" <johnn...@gmail.com
> <mailto:johnn...@gmail.com>> wrote:
>
>
> On 13-05-08 01:35 AM, Ognjen Bubalo wrote:
>
> One more thing I have found is that openid4java-server-0.9.5 and
> openid4java-nodeps-0.9.5 are packaged in my war. However I
> declared the
> dependency like this:
>
> <groupId>org.openid4java</__groupId>
> <artifactId>openid4java</__artifactId>
> <version>0.9.7</version>
>
>
> Can you please confirm that the problem is still happening with 0.9.7?
>
>
> Johnny
>
> --
> You received this message because you are subscribed to the Google
> Groups "OpenID4Java" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to openid4java+unsubscribe@__googlegroups.com
> <mailto:openid4java%2Bunsu...@googlegroups.com>.
> To post to this group, send email to openi...@googlegroups.com
> <mailto:openi...@googlegroups.com>.
> Visit this group at
> http://groups.google.com/__group/openid4java?hl=en
> <http://groups.google.com/group/openid4java?hl=en>.
> For more options, visit https://groups.google.com/__groups/opt_out
> <https://groups.google.com/groups/opt_out>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "OpenID4Java" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to openid4java...@googlegroups.com.

Ognjen Bubalo

unread,
May 10, 2013, 11:19:34 AM5/10/13
to openi...@googlegroups.com
ShengChe Hsiao I sent you some code snippets. Please check it if you have time!

Thank you,
Ogi





--
You received this message because you are subscribed to the Google
Groups "OpenID4Java" group.
To unsubscribe from this group and stop receiving emails from it, send

To post to this group, send email to openi...@googlegroups.com.
Visit this group at http://groups.google.com/group/openid4java?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to a topic in the Google Groups "OpenID4Java" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openid4java/bU5AMEseKjg/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to openid4java+unsubscribe@googlegroups.com.

Shengche Hsiao

unread,
May 10, 2013, 11:44:08 AM5/10/13
to openi...@googlegroups.com
Hello

You are welcome, and please call me 'dragon'!
    <mailto:openi...@googlegroups.com>.



--
You received this message because you are subscribed to the Google
Groups "OpenID4Java" group.
To unsubscribe from this group and stop receiving emails from it, send

To post to this group, send email to openi...@googlegroups.com.
Visit this group at http://groups.google.com/group/openid4java?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to a topic in the Google Groups "OpenID4Java" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openid4java/bU5AMEseKjg/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to openid4java...@googlegroups.com.

To post to this group, send email to openi...@googlegroups.com.
Visit this group at http://groups.google.com/group/openid4java?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups "OpenID4Java" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openid4java...@googlegroups.com.

To post to this group, send email to openi...@googlegroups.com.
Visit this group at http://groups.google.com/group/openid4java?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

-- 

----------------------------------------------------------------------->
We do this not because it is easy. We do this because it is hard.
----------------------------------------------------------------------->
ShengChe Hsiao
----------------------------------------------------------------------->
fron...@gmail.com
fron...@tc.edu.tw
----------------------------------------------------------------------->
Reply all
Reply to author
Forward
0 new messages