Skip to content

How can I add custom 'key attributes' just like 'user attribute'? #745

Closed Answered by ccll
ccll asked this question in Help
Discussion options

You must be logged in to vote

Shortly after posting here I figured it's more complicated than I first thought, and I came up with a hack-ish idea using monkey patch.

  1. add our custom attributes to auth_key table
  2. add relationship between auth_session and auth_key, as we would need to know which key was used to derive current session
  3. monkey patch createSession() to record the key with the derived session
  4. monkey patch AuthRequest.validataUser() to read the related key and its custom attributes from current session, now we should get what we want

Any ideas?

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ccll
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
1 participant