Release of the post login hook with OIDC

オープン
#167 コメント 2 件 リアクション 4 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
28/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python

調査の方向性

273行目のafter_logged_inの例の周辺にあるdash_auth/oidc_auth.pyを確認し、公開済みの2.3.0の動作と比較してください。OIDC callbackがafter_logged_inを呼び出す方法を追跡し、その後、利用可能であればrepositoryのrelease processを確認してください。ドキュメント化されたhookが公開済みのreleaseに含まれ、そのcallbackの動作が検証されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

I was trying to implement some post login logic by following the instructions in the after_logged_in method from @clement-chaneching (https://github.com/plotly/dash-auth/blob/main/dash_auth/oidc_auth.py#L273), but could not get it to work.

 """
       Post-login actions after successful OIDC authentication.
       For example, allows to pass custom attributes to the user session:
       class MyOIDCAuth(OIDCAuth):
           def after_logged_in(self, user, idp, token):
               if user:
                   user["params"] = value1
               return super().after_logged_in(user, idp, token)
"""

I realized that this code was not released... Are there any plans for a new release integrating the latest changes to the package ?

Based on the code from 2.3.0, I ended up having to reset the server url rule for the OIDC callback in the __init__ of a MyOIDCAuth class, providing an overriden callback method (which then returns the overriden after_logged_in method). Without this my new after_logged_in method was never called (but it's possible I'm just confused about how inheritance works in this case).

主要言語
Python
スター
135
フォーク
67
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

plotly/dash-auth のほかの issue

plotly/dash-auth の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。