Skip to content

トークン認証#170

Open
YusukeIwaki wants to merge 1 commit intomasterfrom
implement_token_authentication
Open

トークン認証#170
YusukeIwaki wants to merge 1 commit intomasterfrom
implement_token_authentication

Conversation

@YusukeIwaki
Copy link

GET /api/user/auth_token

{
 auth_token: {
  user: "yusuke.iwaki@example.com",
  token: "91bff21f・・・・・bf7a4",
  expires_at: 1460354503
 }
}

↑のuserとtokenを

x-nasulog-auth-user: yusuke.iwaki@example.com
x-nasulog-auth-token: 91bff21f・・・・・bf7a4

でアクセスすると、ワンタイムトークンでログインができる。

  • 母艦のブラウザでトークンを取得して、サブのアプリとかSPAとかでワンタイムトークンでパスワードレスのログインをするイメージ。
  • 恒久的なトークンではないので、ログイン後は従来通りの cookie[_nasulog_session] を使う。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants