flame/policy.go
func DefaultPolicy(secret string) *Policy {
	return &Policy{
		Secret:  []byte(secret),
		Token:   &Token{},
		Clients: []Client{&Application{}},
		ResourceOwners: func(_ Client) []ResourceOwner {
			return []ResourceOwner{&User{}}
		},
		GrantStrategy:        DefaultGrantStrategy,
		TokenData:            DefaultTokenData,
		AccessTokenLifespan:  time.Hour,
		RefreshTokenLifespan: 7 * 24 * time.Hour,
	}
}
func DefaultPolicy(secret string) *Policy {
	return &Policy{
		Secret:  []byte(secret),
		Token:   &Token{},
		Clients: []Client{&Application{}},
		ResourceOwners: func(_ Client) []ResourceOwner {
			return []ResourceOwner{&User{}}
		},
		GrantStrategy:        DefaultGrantStrategy,
		TokenData:            DefaultTokenData,
		AccessTokenLifespan:  time.Hour,
		RefreshTokenLifespan: 7 * 24 * time.Hour,
	}
}
// DefaultPolicy returns a simple policy that uses all built-in models and
// strategies.
//
// Note: The secret should be at least 16 characters long.