Skip to content
This repository has been archived by the owner on Mar 20, 2019. It is now read-only.

Commit

Permalink
changed MakeKVPost to return a dictionary from the KVForm response
Browse files Browse the repository at this point in the history
darcs-hash:20060612230201-f4df0-e980516f1db37392f6608ca0e5e3e87b328fa7be.gz
  • Loading branch information
Grant Monroe committed Jun 12, 2006
1 parent b011917 commit 990406a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions openid/consumer/genericconsumer.boo
Expand Up @@ -79,7 +79,8 @@ class GenericConsumer:
body = ASCIIEncoding.ASCII.GetBytes(UriUtil.CreateQueryString(args))

try:
return self.fetcher.Post(server_url, body)
resp = self.fetcher.Post(server_url, body)
return KVUtil.KVToDict(resp.data)
except e as FetchException:
if e.response is null:
# XXX: log network failure
Expand Down Expand Up @@ -174,9 +175,9 @@ class GenericConsumer:

private def ProcessCheckAuthResponse(response as IDictionary,
server_url as Uri):
is_valid as string = response['is_valid']
is_valid = response['is_valid']
if is_valid == 'true':
invalidate_handle as string = response['invalidate_handle']
invalidate_handle = response['invalidate_handle']
if invalidate_handle is not null:
self.store.RemoveAssociation(server_url, invalidate_handle)

Expand Down Expand Up @@ -287,10 +288,8 @@ class GenericConsumer:
def constructor(key as string):
super('Query missing key: ${key}')

protected def ParseAssociation(resp as FetchResponse, dh as DiffieHellman,
protected def ParseAssociation(results as IDictionary, dh as DiffieHellman,
server_url as Uri):
results = KVUtil.KVToDict(resp.data)

getParameter = do(key as string):
val as string = results[key]
if val is null:
Expand Down

0 comments on commit 990406a

Please sign in to comment.