'Create a C{L{TeamsResponse}} object from a successful OpenID
library response
(C{L{openid.consumer.consumer.SuccessResponse}}) response
message
@param success_response: A SuccessResponse from consumer.complete()
@type success_response: C{L{openid.consumer.consumer.SuccessResponse}}
@param signed_only: Whether to process only data that was
signed in the id_res message from the server.
@type signed_only: bool
@rtype: TeamsResponse
@returns: A Launchpad teams response containing the data
that was supplied with the C{id_res} response.'

def fromSuccessResponse(cls, success_response, signed_only=True):

    self = cls()
    self.ns_uri = self._getTeamsNS(success_response.message)
    if signed_only:
        args = success_response.getSignedNS(self.ns_uri)
    else:
        args = success_response.message.getArgs(self.ns_uri)
    if ('is_member' in args):
        is_member_str = args['is_member']
        self.is_member = is_member_str.split(',')
    return self
