mock_auth

package
v1.1.25 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0

Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0

Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0

Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0

Index

Constants

View Source
const APP_ACCES_TOKEN = "app_access"
View Source
const USER_ACCESS_TOKEN = "user_access"

Variables

This section is empty.

Functions

This section is empty.

Types

type AppAccessTokenEndpoint

type AppAccessTokenEndpoint struct{}

func (AppAccessTokenEndpoint) Path

func (e AppAccessTokenEndpoint) Path() string

func (AppAccessTokenEndpoint) ServeHTTP

type AppAccessTokenEndpointResponse

type AppAccessTokenEndpointResponse struct {
	AccessToken  string   `json:"access_token"`
	RefreshToken string   `json:"refresh_token"`
	ExpiresIn    int      `json:"expires_in"`
	Scope        []string `json:"scope"`
	TokenType    string   `json:"token_type"`
}

type AppAccessTokenRequestBody

type AppAccessTokenRequestBody struct {
	ClientID     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
	GrantType    string `json:"grant_type"`
	Scope        string `json:"scope"`
}

type AuthEndpoint

type AuthEndpoint interface {
	Path() string
	ServeHTTP(w http.ResponseWriter, r *http.Request)
}

func All

func All() []AuthEndpoint

type UserTokenEndpoint

type UserTokenEndpoint struct{}

func (UserTokenEndpoint) Path

func (e UserTokenEndpoint) Path() string

func (UserTokenEndpoint) ServeHTTP

func (e UserTokenEndpoint) ServeHTTP(w http.ResponseWriter, r *http.Request)

type ValidateTokenEndpoint

type ValidateTokenEndpoint struct{}

func (ValidateTokenEndpoint) Path

func (e ValidateTokenEndpoint) Path() string

func (ValidateTokenEndpoint) ServeHTTP

type ValidateTokenEndpointResponse

type ValidateTokenEndpointResponse struct {
	ClientID  string   `json:"client_id"`
	UserID    string   `json:"user_id,omitempty"`
	UserLogin string   `json:"login,omitempty"`
	ExpiresIn int      `json:"expires_in"`
	Scopes    []string `json:"scopes"`
}

Jump to

Keyboard shortcuts

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