New-VcsOAuthSecurityContext
Creates an OAuth2 security context object that you can use to authenticate a user with any VMware Cloud Service.
Syntax
[-IgnoreSslValidationErrors]
[-VcsServer <String>]
[CommonParameters]
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required |
|
SecureString | named |
|
Specifies the API token you want to use for authentication with the VMware Cloud Services server. The token is obtained from the VMware Cloud Services web portal. | optional |
|
SwitchParameter | named |
|
If specified, any errors with the SSL certificate of the server are ignored. | optional |
|
String | named |
|
Specifies the host name of the VMware Cloud Services API endpoint for the particular instance. The default value is `console.cloud.vmware.com`. You can find the value for your particular instance in the Developer Center section of the VMware Cloud Services web portal. |
-AppSecret <SecureString>
-OrganizationId <String>
-RedirectUrl <Uri>
[-IgnoreSslValidationErrors]
[-VcsServer <String>]
[CommonParameters]
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required |
|
String | named |
|
Specifies the ID of an OAuth App registered in the VMware Cloud Services web portal. | required |
|
SecureString | named |
|
Specifies the secret of an OAuth App registered in the VMware Cloud Services web portal. You can retrieve the secret from the portal only when you create the application. | required |
|
String | named |
|
Specifies the ID of the organization where the access tokens from the security context are valid for. You can see the organization ID in the VMware Cloud Services web portal. | required |
|
Uri | named |
|
Specifies the Redirect URL of the Web App that you created in the VMware Cloud Services web portal for PowerCLI. This URL must be on localhost and a free port on the machine where PowerCLI is running. This URL must use the http schema. | optional |
|
SwitchParameter | named |
|
If specified, any errors with the SSL certificate of the server are ignored. | optional |
|
String | named |
|
Specifies the host name of the VMware Cloud Services API endpoint for the particular instance. The default value is `console.cloud.vmware.com`. You can find the value for your particular instance in the Developer Center section of the VMware Cloud Services web portal. |
-AppSecret <SecureString>
-OrganizationId <String>
[-IgnoreSslValidationErrors]
[-VcsServer <String>]
[CommonParameters]
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required |
|
String | named |
|
Specifies the ID of an OAuth App registered in the VMware Cloud Services web portal. | required |
|
SecureString | named |
|
Specifies the secret of an OAuth App registered in the VMware Cloud Services web portal. You can retrieve the secret from the portal only when you create the application. | required |
|
String | named |
|
Specifies the ID of the organization where the access tokens from the security context are valid for. You can see the organization ID in the VMware Cloud Services web portal. | optional |
|
SwitchParameter | named |
|
If specified, any errors with the SSL certificate of the server are ignored. | optional |
|
String | named |
|
Specifies the host name of the VMware Cloud Services API endpoint for the particular instance. The default value is `console.cloud.vmware.com`. You can find the value for your particular instance in the Developer Center section of the VMware Cloud Services web portal. |
Output
VMware.CloudServices.Types.V1.VcsOAuthSecurityContext
Examples
Example 1
Creates an OAuth2 security context object by authenticating the user with an API token from the VMware Cloud Services web portal.
Example 2
Creates an OAuth2 security context object by authenticating the user with an API token from the VMware Cloud Services web portal for a particular instance of the service. In this example, that is the public commercial instance at https://console.cloud.vmware.com.
Example 3
Creates an OAuth2 security context object by authenticating as a service application using the credentials of a Service-To-Service App registered with the VMware Cloud Services web portal.
Example 4
Creates an OAuth2 security context object by authenticating through the VMware Cloud Services web portal and providing the credentials of a Web App.
Related Commands