0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

フェデレーションとOAuth2.0 認証の流れ

Posted at

AndroidでgoogleSign-Inを実装する時にまとめたもの。
OAuth2.0は多くのサービスで登場し当然モバイル開発でも利用するので自分用にまとめました。

Credential Manager は、ユーザー名とパスワード、パスキー、フェデレーション サインイン ソリューション (Google でのサインインなど) などの複数のサインイン方法を単一の API でサポートする Jetpack API であり、開発者の統合を簡素化します(翻訳)
引用元:
https://developer.android.com/identity/sign-in/credential-manager?hl=en

フェデレーション認証とは、Googleアカウントなどの外部のIdP(Identity Provider)を利用して、別のサービス(RP)にログインする仕組み。Googleサインインはその一例。
:::
この場合の利用サービスをRP呼ぶ
本人確認を行なった後ユーザーに対してサービス提供を行う主体
:::

認証情報の管理や認証を行う主体のことをIdP(アイデンティプロパイダー)という。
例。Google,MicroSoft等
CredentialManagerはGoogleIdPのフェデレーションに対応している

CredentialManagerでは
フェデレーションのセキュリティ強化のために
フェデレーション+パスキー、フェデレーション+パスワードが用意されている

パスキーは顔スキャン、指紋、PINでログインできる
Googleから推奨されている方法。

Oauth2.0

OAuth2.0
IdPと認可サーバーのやり取りの1と3をプロトコルにしたものがOAuth2.0

1.ユーザーがIdP(Googleなど)で認証し、RPにログインする
2.RPはIdPの認可サーバーにアクセストークンを要求する
3.「ユーザー情報をRPに渡していいですか?」とIdPの認可サーバーがユーザーに確認する
4.OKならIdPの認可サーバーがアクセストークンをRPに発行
5.RPは発行されたアクセストークンをリソースサーバーに渡す
6.リソースサーバーはその検証を行い、権限があるユーザーデータをRPに渡す

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?