Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

traQユーザー認証をOAuth2からcaddy-trap-authに変更する #554

Open
ras0q opened this issue Jul 9, 2024 · 0 comments
Open

traQユーザー認証をOAuth2からcaddy-trap-authに変更する #554

ras0q opened this issue Jul 9, 2024 · 0 comments

Comments

@ras0q
Copy link
Member

ras0q commented Jul 9, 2024

既にステージング環境・本番環境共に/opt/caddy/vhosts/knoQにtrapauthをかけているので、OAuth2を使わなくてもリクエストヘッダからtraQユーザー認証を行うことができる
ヘッダから取るようにすることで以下を消すことができるはず

knoQ/infra/traq/user.go

Lines 50 to 52 in 04e012d

func (repo *TraQRepository) GetUserMe(token *oauth2.Token) (*traq.User, error) {
ctx := context.TODO()
apiClient := NewOauth2APIClient(ctx, token)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant