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..