token

package
v0.0.0-...-a423d60 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RuntimeScopes                                    = "webhook:write runtime:read runtime:write application:read runtime.auths:read bundle.instance_auths:read"
	ApplicationScopes                                = "" /* 272-byte string literal not displayed */
	IntegrationSystemScopes                          = "" /* 395-byte string literal not displayed */
	IntegrationSystemScopesWithoutInternalVisibility = "" /* 331-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func ChangeSubdomain

func ChangeSubdomain(tokenURL, newSubdomain, oauthTokenPath string) (string, error)

func FlattenTokenClaims

func FlattenTokenClaims(stdT *testing.T, consumerToken string) string

func GetAccessToken

func GetAccessToken(t *testing.T, oauthCredentialData *graphql.OAuthCredentialData, scopes string) string

func GetAccessTokenBench

func GetAccessTokenBench(b *testing.B, oauthCredentialData *graphql.OAuthCredentialData, scopes string) string

func GetClientCredentialsToken

func GetClientCredentialsToken(t *testing.T, ctx context.Context, tokenURL, clientID, clientSecret, staticMappingClaimsKey string) string

func GetClientCredentialsTokenWithClient

func GetClientCredentialsTokenWithClient(t *testing.T, ctx context.Context, client *http.Client, tokenURL, clientID, clientSecret, staticMappingClaimsKey string) string

func GetToken

func GetToken(t *testing.T, ctx context.Context, tokenURL, clientID, clientSecret string, data url.Values) string

func GetTokenWithClient

func GetTokenWithClient(t *testing.T, ctx context.Context, client *http.Client, oauthConfig OauthConfig) string

func GetUserToken

func GetUserToken(t *testing.T, ctx context.Context, tokenURL, clientID, clientSecret, username, password, staticMappingClaimsKey string) string

func HttpRequestBodyCloser

func HttpRequestBodyCloser(t *testing.T, resp *http.Response)

func HttpRequestBodyCloserBench

func HttpRequestBodyCloserBench(b *testing.B, resp *http.Response)

Types

type HydraToken

type HydraToken struct {
	AccessToken string `json:"access_token"`
	ExpiresIn   int    `json:"expires_in"`
	Scope       string `json:"scope"`
	TokenType   string `json:"token_type"`
}

func FetchHydraAccessToken

func FetchHydraAccessToken(t *testing.T, encodedCredentials string, tokenURL string, scopes string) (*HydraToken, error)

func FetchHydraAccessTokenBench

func FetchHydraAccessTokenBench(b *testing.B, encodedCredentials string, tokenURL string, scopes string) (*HydraToken, error)

type OauthConfig

type OauthConfig struct {
	TokenURL     string
	ClientID     string
	ClientSecret string
	Data         url.Values
}

Jump to

Keyboard shortcuts

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