oauth

package
v0.0.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AccessTokenAttributeTypeMap = []struct {
	Name     string `json:"name"`
	BaseName string `json:"baseName"`
	Type     string `json:"type"`
	Format   string `json:"format"`
}{
	{"HubID", "hubId", "int", "int32"},
	{"UserID", "userId", "int", "int32"},
	{"Scopes", "scopes", "Array", "string"},
	{"TokenType", "tokenType", "string", "string"},
	{"User", "user", "string", "string"},
	{"HubDomain", "hubDomain", "string", "string"},
	{"AppID", "appId", "int", "int32"},
	{"ExpiresIn", "expiresIn", "int", "int32"},
	{"Token", "token", "string", "string"},
}

AccessTokenAttributeTypeMap is a static field that holds the attribute information.

View Source
var TokenAttributeTypeMap = []struct {
	Name     string `json:"name"`
	BaseName string `json:"baseName"`
	Type     string `json:"type"`
	Format   string `json:"format"`
}{
	{"AccessToken", "accessToken", "string", "string"},
	{"RefreshToken", "refreshToken", "string", "string"},
	{"IDToken", "idToken", "string", "string"},
	{"TokenType", "tokenType", "string", "string"},
	{"ExpiresIn", "expiresIn", "int", "int32"},
}

TokenAttributeTypeMap is a static field that holds the attribute information for this struct.

Functions

This section is empty.

Types

type AccessTokenInfoResponse

type AccessTokenInfoResponse struct {
	HubID     int      `json:"hubId"`
	UserID    int      `json:"userId"`
	Scopes    []string `json:"scopes"`
	TokenType string   `json:"tokenType"`
	User      *string  `json:"user,omitempty"`
	HubDomain *string  `json:"hubDomain,omitempty"`
	AppID     int      `json:"appId"`
	ExpiresIn int      `json:"expiresIn"`
	Token     string   `json:"token"`
}

AccessTokenInfoResponse represents the structure of the response for an access token info.

func NewAccessTokenInfoResponse

func NewAccessTokenInfoResponse() *AccessTokenInfoResponse

NewAccessTokenInfoResponse Constructor function to initialize

func (*AccessTokenInfoResponse) GetAttributeTypeMap

func (r *AccessTokenInfoResponse) GetAttributeTypeMap() []struct {
	Name     string `json:"name"`
	BaseName string `json:"baseName"`
	Type     string `json:"type"`
	Format   string `json:"format"`
}

GetAttributeTypeMap returns the attribute type map for the struct.

type AccessTokensApi

type AccessTokensApi struct {
}

type OauthDiscovery

type OauthDiscovery struct {
	// contains filtered or unexported fields
}

OauthDiscovery holds instances of the API clients

func NewOauthDiscovery

func NewOauthDiscovery(config configuration.Configuration) *OauthDiscovery

NewOauthDiscovery initializes the OauthDiscovery struct with optional configuration

func (*OauthDiscovery) GetAuthorizationUrl

func (o *OauthDiscovery) GetAuthorizationUrl(optionalScope, state string) string

GetAuthorizationUrl generates the authorization URL based on the provided parameters

type RefreshTokenInfoResponse

type RefreshTokenInfoResponse struct {
	HubID     int      `json:"hubId"`
	UserID    int      `json:"userId"`
	Scopes    []string `json:"scopes"`
	TokenType string   `json:"tokenType"`
	User      *string  `json:"user,omitempty"`      // Optional field
	HubDomain *string  `json:"hubDomain,omitempty"` // Optional field
	ClientID  string   `json:"clientId"`
	Token     string   `json:"token"`
}

RefreshTokenInfoResponse represents the structure of the response for a refresh token info.

type RefreshTokensApi

type RefreshTokensApi struct {
}

type TokenResponseIF

type TokenResponseIF struct {
	AccessToken  string  `json:"accessToken"`
	RefreshToken string  `json:"refreshToken"`
	IDToken      *string `json:"idToken,omitempty"` // Optional field
	TokenType    string  `json:"tokenType"`
	ExpiresIn    int     `json:"expiresIn"`
}

TokenResponseIF represents the structure of the token response information.

func NewTokenResponseIF

func NewTokenResponseIF() *TokenResponseIF

NewTokenResponseIF Constructor function to initialize TokenResponseIF

func (*TokenResponseIF) GetAttributeTypeMap

func (t *TokenResponseIF) GetAttributeTypeMap() []struct {
	Name     string `json:"name"`
	BaseName string `json:"baseName"`
	Type     string `json:"type"`
	Format   string `json:"format"`
}

GetAttributeTypeMap returns the attribute type map for the struct.

type TokensApi

type TokensApi struct {
}

Jump to

Keyboard shortcuts

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