...

Source file src/github.com/ory/fosite/compose/compose_rfc7523.go

Documentation: github.com/ory/fosite/compose

     1  package compose
     2  
     3  import (
     4  	"github.com/ory/fosite/handler/oauth2"
     5  	"github.com/ory/fosite/handler/rfc7523"
     6  )
     7  
     8  // RFC7523AssertionGrantFactory creates an OAuth2 Authorize JWT Grant (using JWTs as Authorization Grants) handler
     9  // and registers an access token, refresh token and authorize code validator.
    10  func RFC7523AssertionGrantFactory(config *Config, storage interface{}, strategy interface{}) interface{} {
    11  	return &rfc7523.Handler{
    12  		Storage:                  storage.(rfc7523.RFC7523KeyStorage),
    13  		ScopeStrategy:            config.GetScopeStrategy(),
    14  		AudienceMatchingStrategy: config.GetAudienceStrategy(),
    15  		TokenURL:                 config.TokenURL,
    16  		SkipClientAuth:           config.GrantTypeJWTBearerCanSkipClientAuth,
    17  		JWTIDOptional:            config.GrantTypeJWTBearerIDOptional,
    18  		JWTIssuedDateOptional:    config.GrantTypeJWTBearerIssuedDateOptional,
    19  		JWTMaxDuration:           config.GetJWTMaxDuration(),
    20  		HandleHelper: &oauth2.HandleHelper{
    21  			AccessTokenStrategy: strategy.(oauth2.AccessTokenStrategy),
    22  			AccessTokenStorage:  storage.(oauth2.AccessTokenStorage),
    23  			AccessTokenLifespan: config.GetAccessTokenLifespan(),
    24  		},
    25  	}
    26  }
    27  

View as plain text