trusts

package
v1.0.18 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package trusts enables management of OpenStack Identity Trusts.

Example to Create a Token with Username, Password, and Trust ID

var trustToken struct {
	tokens.Token
	trusts.TokenExt
}

authOptions := tokens.AuthOptions{
	UserID:   "username",
	Password: "password",
}

createOpts := trusts.AuthOptsExt{
	AuthOptionsBuilder: authOptions,
	TrustID:            "de0945a",
}

err := tokens.Create(identityClient, createOpts).ExtractInto(&trustToken)
if err != nil {
	panic(err)
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthOptsExt

type AuthOptsExt struct {
	tokens.AuthOptionsBuilder

	// TrustID is the ID of the trust.
	TrustID string `json:"id"`
}

AuthOptsExt extends the base Identity v3 tokens AuthOpts with a TrustID.

func (AuthOptsExt) CanReauth

func (opts AuthOptsExt) CanReauth() bool

func (AuthOptsExt) ToTokenV3CreateMap

func (opts AuthOptsExt) ToTokenV3CreateMap(scope map[string]interface{}) (map[string]interface{}, error)

ToTokenV3CreateMap builds a create request body from the AuthOpts.

func (AuthOptsExt) ToTokenV3ScopeMap

func (opts AuthOptsExt) ToTokenV3ScopeMap() (map[string]interface{}, error)

ToTokenV3ScopeMap builds a scope from AuthOpts.

type TokenExt

type TokenExt struct {
	Trust Trust `json:"OS-TRUST:trust"`
}

TokenExt represents an extension of the base token result.

type Trust

type Trust struct {
	ID                 string      `json:"id"`
	Impersonation      bool        `json:"impersonation"`
	TrusteeUser        TrusteeUser `json:"trustee_user"`
	TrustorUser        TrustorUser `json:"trustor_user"`
	RedelegatedTrustID string      `json:"redelegated_trust_id"`
	RedelegationCount  int         `json:"redelegation_count"`
}

Trust represents a delegated authorization request between two identities.

type TrusteeUser

type TrusteeUser struct {
	ID string `json:"id"`
}

TrusteeUser represents the trusted user ID of a trust.

type TrustorUser

type TrustorUser struct {
	ID string `json:"id"`
}

TrustorUser represents the trusting user ID of a trust.

Directories

Path Synopsis
trusts unit tests
trusts unit tests

Jump to

Keyboard shortcuts

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