mock

package
v0.0.0-...-fbe9a17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PublicClient = model.ClientInfo{
		ID:           uuidMust(),
		Name:         "Test Public Client",
		Type:         model.ClientTypePublic,
		RedirectURIs: []string{"localhost"},
		Scopes: []*model.Scope{
			{Name: "default"},
		},
		GrantTypes: []model.GrantType{
			model.GrantTypeAuthorizationCode,
			model.GrantTypeRefreshToken,
		},
		AccessTokenLife:  60 * 60,
		RefreshTokenLife: 60 * 60 * 24,
		Providers: []model.Provider{
			model.ProviderFTAuth,
		},
	}

	AdminClient = model.ClientInfo{
		ID:           uuidMust(),
		Name:         "Test Admin Client",
		Type:         model.ClientTypePublic,
		RedirectURIs: []string{"localhost"},
		Scopes: []*model.Scope{
			{Name: "default"},
			{Name: "admin"},
		},
		GrantTypes: []model.GrantType{
			model.GrantTypeAuthorizationCode,
			model.GrantTypeRefreshToken,
		},
		AccessTokenLife:  60 * 60,
		RefreshTokenLife: 60 * 60 * 24,
		Providers: []model.Provider{
			model.ProviderFTAuth,
		},
	}

	ConfidentialClient = model.ClientInfo{
		ID:           uuidMust(),
		Name:         "Test Confidential Client",
		Type:         model.ClientTypeConfidential,
		Secret:       "secret",
		RedirectURIs: []string{"localhost"},
		Scopes: []*model.Scope{
			{Name: "default"},
		},
		GrantTypes: []model.GrantType{
			model.GrantTypeClientCredentials,
		},
		AccessTokenLife:  60 * 60,
		RefreshTokenLife: 60 * 60 * 24,
		Providers: []model.Provider{
			model.ProviderFTAuth,
		},
	}
)

Mock clients

View Source
var DefaultClient = model.ClientInfo{
	ID:           createUUID(),
	Name:         "Public Client",
	Type:         model.ClientTypePublic,
	Secret:       "",
	RedirectURIs: []string{"localhost"},
	Scopes: []*model.Scope{
		{
			Name: "default",
		},
	},
	JWKsURI: "http://localhost:8000/jwks.json",
	LogoURI: "",
	GrantTypes: []model.GrantType{
		model.GrantTypeAuthorizationCode,
		model.GrantTypeClientCredentials,
		model.GrantTypeRefreshToken,
	},
	AccessTokenLife:  3600,
	RefreshTokenLife: 86400,
	Providers:        []model.Provider{model.ProviderFTAuth},
}

DefaultClient represents an auto-generated admin client.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL