Chapter 07

[Strategy] ハンドラーの処理実体

abcb2
abcb2
2023.02.03に更新

oauth2

AuthorizeExplicitGrantHandler

handler/oauth2/flow_authorize_code_auth.goで定義されている。

response_type=codeの「RFC6749 4.1 Authorization Code Grant」対応しています。

下記のように、認可エンドポイント(/authorize)とトークンエンドポイント(/token)の処理に対応できるようにinterfaceを実装しています。

var _ fosite.AuthorizeEndpointHandler = (*AuthorizeExplicitGrantHandler)(nil)
var _ fosite.TokenEndpointHandler = (*AuthorizeExplicitGrantHandler)(nil)

AuthorizeImplicitGrantTypeHandler

handler/oauth2/flow_authorize_implicit.goで定義されている。

response_type=token「RFC6749 4.2 Implicit Grant」に対応しています。

下記のように認可エンドポイントでの処理に対応しています。

var _ fosite.AuthorizeEndpointHandler = (*AuthorizeImplicitGrantTypeHandler)(nil)

ClientCredentialsGrantHandler

handler/oauth2/flow_client_credentials.goで定義されている。

grant_type=client_credentials「RFC6749 4.4 Client Credentials Grant」に対応しています。

下記のようにトークンエンドポイントでの処理に対応しています。

var _ fosite.TokenEndpointHandler = (*ClientCredentialsGrantHandler)(nil)

RefreshTokenGrantHandler

handler/oauth2/flow_refresh.goで定義されている。

grant_type=refresh_token「RFC6749 6 Refreshing an Access Token」に対応しています。

下記のようにトークンエンドポイントでの処理に対応しています。

var _ fosite.TokenEndpointHandler = (*RefreshTokenGrantHandler)(nil)

ResourceOwnerPasswordCredentialsGrantHandler

handler/oauth2/flow_resource_owner.goで定義されている。

grant_type=password「RFC6749 4.3 Resource Owner Password Credentials Grant」に対応しています。

OAuth2.1で廃止予定です。

下記のようにトークンエンドポイントでの処理に対応しています。

var _ fosite.TokenEndpointHandler = (*ResourceOwnerPasswordCredentialsGrantHandler)(nil)

CoreValidator

handler/oauth2/introspector.goで定義されている。

下記のようにイントロスペクションエンドポイントでの処理に対応しています。

var _ fosite.TokenIntrospector = (*CoreValidator)(nil)

StatelessJWTValidator

handler/oauth2/introspector_jwt.goで定義されている。

イントロスペクションエンドポイントでjwtをチェックするための処理に対応しています。

TokenRevocationHandler

handler/oauth2./revocation.goで定義されている。

トークンリボークエンドポイントでの処理に対応しています。

openid

TBD..

par

TBD..

pkce

Handler

handler/pkce/handler.goで定義されている。

トークンエンドポイントでの処理に対応しています。

var _ fosite.TokenEndpointHandler = (*Handler)(nil)

rfc7523

TBD..