raxauth

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authenticate

func Authenticate(client *gophercloud.ProviderClient, options AuthOptions, eo gophercloud.EndpointOpts) error

Types

type ApiKeyCredentialsV2

type ApiKeyCredentialsV2 struct {
	Username string `json:"username" required:"true"`
	ApiKey   string `json:"apiKey" required:"true"`
}

ApiKeyCredentialsV2 represents the required options to authenticate with a Rackspace API key

type AuthOptions

type AuthOptions struct {
	IdentityEndpoint string `json:"-"`
	Username         string `json:"username,omitempty"`
	Password         string `json:"password,omitempty"`
	ApiKey           string `json:"apiKey,omitempty"`
	TenantID         string `json:"tenantId,omitempty"`
	TenantName       string `json:"tenantName,omitempty"`
	AllowReauth      bool   `json:"-"`
	TokenID          string
}

AuthOptions are the valid options for Openstack Identity v2 authentication. For field descriptions, see gophercloud.AuthOptions.

func (AuthOptions) ToTokenV2CreateMap

func (opts AuthOptions) ToTokenV2CreateMap() (map[string]interface{}, error)

ToTokenV2CreateMap allows AuthOptions to satisfy the AuthOptionsBuilder interface in the v2 tokens package

type AuthOptionsV2

type AuthOptionsV2 struct {
	PasswordCredentials *tokens2.PasswordCredentialsV2 `json:"passwordCredentials,omitempty"`

	// TokenCredentials allows users to authenticate (possibly as another user)
	// with an authentication token ID.
	TokenCredentials *tokens2.TokenCredentialsV2 `json:"token,omitempty"`

	// ApiKeyCredentials allows users to authenticate with a Rackspace API key
	ApiKeyCredentials *ApiKeyCredentialsV2 `json:"RAX-KSKEY:apiKeyCredentials,omitempty"`
}

AuthOptionsV2 wraps a gophercloud AuthOptions in order to adhere to the AuthOptionsBuilder interface.

Jump to

Keyboard shortcuts

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