Documentation ¶
Index ¶
- Constants
- func GetDomainTokenWithIdTokenRequest(iamEndpoint, idpId, idToken, domainId string, httpConfig config.HttpConfig) *request.DefaultHttpRequest
- func GetIamEndpoint() string
- func GetKeystoneListAuthDomainsRequest(iamEndpoint string, httpConfig config.HttpConfig) *request.DefaultHttpRequest
- func GetKeystoneListProjectsRequest(iamEndpoint string, regionId string, httpConfig config.HttpConfig) *request.DefaultHttpRequest
- func GetProjectTokenWithIdTokenRequest(iamEndpoint, idpId, idToken, projectId string, httpConfig config.HttpConfig) *request.DefaultHttpRequest
- func GetResponseBody(resp *response.DefaultHttpResponse) ([]byte, error)
- func KeystoneListAuthDomains(client *impl.DefaultHttpClient, req *request.DefaultHttpRequest) (string, error)
- func KeystoneListProjects(client *impl.DefaultHttpClient, req *request.DefaultHttpRequest) (string, error)
- type CreateTokenWithIdTokenRequest
- type CreateTokenWithIdTokenResponse
- type Credential
- type DomainInfo
- type Domains
- type FederationUserBody
- type GetIdTokenAuthParams
- type GetIdTokenIdScopeBody
- type GetIdTokenIdTokenBody
- type GetIdTokenRequestBody
- type GetIdTokenScopeDomainOrProjectBody
- type GetTemporaryCredentialFromMetadataResponse
- type IdpIdInfo
- type KeystoneListAuthDomainsResponse
- type KeystoneListProjectsResponse
- type OsFederationInfo
- type ProjectInfo
- type ProjectResult
- type ProtocolIdInfo
- type ScopedTokenInfo
- type ScopedTokenInfoRoles
- type UnscopedTokenInfoCatalog
Constants ¶
View Source
const ( DefaultIamEndpoint = "https://iam.myhuaweicloud.com" KeystoneListProjectsUri = "/v3/projects" KeystoneListAuthDomainsUri = "/v3/auth/domains" IamEndpointEnv = "HUAWEICLOUD_SDK_IAM_ENDPOINT" CreateTokenWithIdTokenUri = "/v3.0/OS-AUTH/id-token/tokens" NoDomainIdFound = `` /* 414-byte string literal not displayed */ NoProjectIdFound = `` /* 418-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
func GetDomainTokenWithIdTokenRequest ¶ added in v0.0.96
func GetDomainTokenWithIdTokenRequest(iamEndpoint, idpId, idToken, domainId string, httpConfig config.HttpConfig) *request.DefaultHttpRequest
func GetIamEndpoint ¶ added in v0.0.92
func GetIamEndpoint() string
func GetKeystoneListAuthDomainsRequest ¶
func GetKeystoneListAuthDomainsRequest(iamEndpoint string, httpConfig config.HttpConfig) *request.DefaultHttpRequest
func GetKeystoneListProjectsRequest ¶
func GetKeystoneListProjectsRequest(iamEndpoint string, regionId string, httpConfig config.HttpConfig) *request.DefaultHttpRequest
func GetProjectTokenWithIdTokenRequest ¶ added in v0.0.96
func GetProjectTokenWithIdTokenRequest(iamEndpoint, idpId, idToken, projectId string, httpConfig config.HttpConfig) *request.DefaultHttpRequest
func GetResponseBody ¶
func GetResponseBody(resp *response.DefaultHttpResponse) ([]byte, error)
func KeystoneListAuthDomains ¶
func KeystoneListAuthDomains(client *impl.DefaultHttpClient, req *request.DefaultHttpRequest) (string, error)
func KeystoneListProjects ¶
func KeystoneListProjects(client *impl.DefaultHttpClient, req *request.DefaultHttpRequest) (string, error)
Types ¶
type CreateTokenWithIdTokenRequest ¶ added in v0.0.96
type CreateTokenWithIdTokenRequest struct { XIdpId string `json:"X-Idp-Id"` Body *GetIdTokenRequestBody `json:"body,omitempty"` }
type CreateTokenWithIdTokenResponse ¶ added in v0.0.96
type CreateTokenWithIdTokenResponse struct { Token *ScopedTokenInfo `json:"token"` XSubjectToken string `json:"X-Subject-Token"` XRequestId string `json:"X-Request-Id"` HttpStatusCode int `json:"-"` }
func CreateTokenWithIdToken ¶ added in v0.0.96
func CreateTokenWithIdToken(client *impl.DefaultHttpClient, req *request.DefaultHttpRequest) (*CreateTokenWithIdTokenResponse, error)
type Credential ¶
type Credential struct { ExpiresAt string `json:"expires_at"` Access string `json:"access"` Secret string `json:"secret"` Securitytoken string `json:"securitytoken"` }
func GetCredentialFromMetadata ¶ added in v0.0.96
func GetCredentialFromMetadata() (*Credential, error)
type DomainInfo ¶ added in v0.0.96
type FederationUserBody ¶ added in v0.0.96
type FederationUserBody struct { OsFederation *OsFederationInfo `json:"OS-FEDERATION"` Domain *DomainInfo `json:"domain"` Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` }
type GetIdTokenAuthParams ¶ added in v0.0.96
type GetIdTokenAuthParams struct { IdToken *GetIdTokenIdTokenBody `json:"id_token"` Scope *GetIdTokenIdScopeBody `json:"scope,omitempty"` }
type GetIdTokenIdScopeBody ¶ added in v0.0.96
type GetIdTokenIdScopeBody struct { Domain *GetIdTokenScopeDomainOrProjectBody `json:"domain,omitempty"` Project *GetIdTokenScopeDomainOrProjectBody `json:"project,omitempty"` }
type GetIdTokenIdTokenBody ¶ added in v0.0.96
type GetIdTokenIdTokenBody struct {
Id string `json:"id"`
}
type GetIdTokenRequestBody ¶ added in v0.0.96
type GetIdTokenRequestBody struct {
Auth *GetIdTokenAuthParams `json:"auth"`
}
type GetIdTokenScopeDomainOrProjectBody ¶ added in v0.0.96
type GetTemporaryCredentialFromMetadataResponse ¶
type GetTemporaryCredentialFromMetadataResponse struct {
Credential *Credential `json:"credential,omitempty"`
}
type KeystoneListAuthDomainsResponse ¶
type KeystoneListAuthDomainsResponse struct {
Domains *[]Domains `json:"domains,omitempty"`
}
type KeystoneListProjectsResponse ¶
type KeystoneListProjectsResponse struct {
Projects *[]ProjectResult `json:"projects,omitempty"`
}
type OsFederationInfo ¶ added in v0.0.96
type OsFederationInfo struct { IdentityProvider *IdpIdInfo `json:"identity_provider"` Protocol *ProtocolIdInfo `json:"protocol"` Groups []interface{} `json:"groups"` }
type ProjectInfo ¶ added in v0.0.96
type ProjectInfo struct { Domain *DomainInfo `json:"domain,omitempty"` Id *string `json:"id,omitempty"` Name string `json:"name"` }
type ProjectResult ¶
type ProtocolIdInfo ¶ added in v0.0.96
type ProtocolIdInfo struct {
Id string `json:"id"`
}
type ScopedTokenInfo ¶ added in v0.0.96
type ScopedTokenInfo struct { ExpiresAt string `json:"expires_at"` Methods []string `json:"methods"` IssuedAt string `json:"issued_at"` User *FederationUserBody `json:"user"` Domain *DomainInfo `json:"domain,omitempty"` Project *ProjectInfo `json:"project,omitempty"` Roles []ScopedTokenInfoRoles `json:"roles"` Catalog []UnscopedTokenInfoCatalog `json:"catalog"` }
type ScopedTokenInfoRoles ¶ added in v0.0.96
Click to show internal directories.
Click to hide internal directories.