mock_auth

package
v1.1.14 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2022 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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