Skip to content

Commit fca7bf6

Browse files
author
Ioannis Kakavas
committed
Fix userid handling for Github backend
According to the documentation, the id of the user is returned as an integer (https://developer.github.com/v3/users/). We assume later on that it is a string so cast it to str here
1 parent 0b2928d commit fca7bf6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/satosa/backends/github.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def _authn_response(self, context):
9898
internal_response = InternalResponse(auth_info=auth_info)
9999
internal_response.attributes = self.converter.to_internal(
100100
self.external_type, user_info)
101-
internal_response.user_id = user_info[self.user_id_attr]
101+
internal_response.user_id = str(user_info[self.user_id_attr])
102102
del context.state[self.name]
103103
return self.auth_callback_func(context, internal_response)
104104

0 commit comments

Comments
 (0)