# Functions
Compose takes a config, a storage, a strategy and handlers to instantiate an OAuth2Provider:
import "github.com/ory/fosite/compose"
// var storage = new(MyFositeStorage) var config = Config { AccessTokenLifespan: time.Minute * 30, // check Config for further configuration options }
var strategy = NewOAuth2HMACStrategy(config)
var oauth2Provider = Compose( config, storage, strategy, NewOAuth2AuthorizeExplicitHandler, OAuth2ClientCredentialsGrantFactory, // for a complete list refer to the docs of this package )
Compose makes use of interface{} types in order to be able to handle a all types of stores, strategies and handlers.
ComposeAllEnabled returns a fosite instance with all OAuth2 and OpenID Connect handlers enabled.
OAuth2AuthorizeExplicitFactory creates an OAuth2 authorize code grant ("authorize explicit flow") handler and registers an access token, refresh token and authorize code validator.
OAuth2AuthorizeImplicitFactory creates an OAuth2 implicit grant ("authorize implicit flow") handler and registers an access token, refresh token and authorize code validator.
OAuth2ClientCredentialsGrantFactory creates an OAuth2 client credentials grant handler and registers an access token, refresh token and authorize code validator.
OAuth2PKCEFactory creates a PKCE handler.
OAuth2RefreshTokenGrantFactory creates an OAuth2 refresh grant handler and registers an access token, refresh token and authorize code validator.nmj.
OAuth2ResourceOwnerPasswordCredentialsFactory creates an OAuth2 resource owner password credentials grant handler and registers an access token, refresh token and authorize code validator.
OAuth2StatelessJWTIntrospectionFactory creates an OAuth2 token introspection handler and registers an access token validator.
OAuth2TokenIntrospectionFactory creates an OAuth2 token introspection handler and registers an access token and refresh token validator.
OAuth2TokenRevocationFactory creates an OAuth2 token revocation handler.
OIDCUserinfoVerifiableCredentialFactory creates a verifiable credentials handler.
OpenIDConnectExplicitFactory creates an OpenID Connect explicit ("authorize code flow") grant handler.
OpenIDConnectHybridFactory creates an OpenID Connect hybrid grant handler.
OpenIDConnectImplicitFactory creates an OpenID Connect implicit ("implicit flow") grant handler.
OpenIDConnectRefreshFactory creates a handler for refreshing openid connect tokens.
PushedAuthorizeHandlerFactory creates the basic PAR handler.
RFC7523AssertionGrantFactory creates an OAuth2 Authorize JWT Grant (using JWTs as Authorization Grants) handler and registers an access token, refresh token and authorize code validator.