authorisationtest

package
v2.31.2 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// AdminJWTToken is a valid JWT token that contains the administrator group 'groups/role-admin'.
	AdminJWTToken = "" /* 1342-byte string literal not displayed */

	// PublisherJWTToken is a valid JWT token that contains the publisher group 'groups/role-admin'.
	PublisherJWTToken = "" /* 1347-byte string literal not displayed */

	// ZebedeeServiceToken is a non-JWT old world service token that the library is going to have to be able to handle for transitional support
	ZebedeeServiceToken = "Bearer 5c227034be6e2c9acca6018808fec9fbd1490a5128d7c74dd8b16d1f001b4b05"
)

Functions

func GetDefaultPermissionsBundle

func GetDefaultPermissionsBundle() *permsdk.Bundle

GetDefaultPermissionsBundle returns a default set permissions bundle data.

Types

type FakePermissionsAPI

type FakePermissionsAPI struct {
	*httpfake.HTTPFake
}

FakePermissionsAPI provides a fake HTTP server for the permissions API.

func NewFakePermissionsAPI

func NewFakePermissionsAPI() *FakePermissionsAPI

NewFakePermissionsAPI creates a new instance of FakePermissionsAPI with a default permissions bundle response.

func (*FakePermissionsAPI) URL

func (f *FakePermissionsAPI) URL() string

URL returns the URL of the HTTP server. This can be used in the setup of the component test to override the default URL for the permission API.

func (*FakePermissionsAPI) UpdatePermissionsBundleResponse

func (f *FakePermissionsAPI) UpdatePermissionsBundleResponse(bundle *permsdk.Bundle) error

UpdatePermissionsBundleResponse overrides the default response to return custom permission bundle data.

Jump to

Keyboard shortcuts

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