forked from loafle/openapi-generator-original
* add bearer auth API to echo-api * run generate-samples.sh * add resttemplate echo-api sample * add bearer auth test * remove @Ignore
2.5 KiB
2.5 KiB
PSOpenAPITools.PSOpenAPITools\Api.AuthApi
All URIs are relative to http://localhost:3000
Method | HTTP request | Description |
---|---|---|
Test-AuthHttpBasic | POST /auth/http/basic | To test HTTP basic authentication |
Test-AuthHttpBearer | POST /auth/http/bearer | To test HTTP bearer authentication |
Test-AuthHttpBasic
String Test-AuthHttpBasic
To test HTTP basic authentication
To test HTTP basic authentication
Example
# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# Configure HTTP basic authorization: http_auth
$Configuration.Username = "YOUR_USERNAME"
$Configuration.Password = "YOUR_PASSWORD"
# To test HTTP basic authentication
try {
$Result = Test-AuthHttpBasic
} catch {
Write-Host ("Exception occurred when calling Test-AuthHttpBasic: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}
Parameters
This endpoint does not need any parameter.
Return type
String
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: text/plain
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Test-AuthHttpBearer
String Test-AuthHttpBearer
To test HTTP bearer authentication
To test HTTP bearer authentication
Example
# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-Configuration
# To test HTTP bearer authentication
try {
$Result = Test-AuthHttpBearer
} catch {
Write-Host ("Exception occurred when calling Test-AuthHttpBearer: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}
Parameters
This endpoint does not need any parameter.
Return type
String
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: text/plain
[Back to top] [Back to API list] [Back to Model list] [Back to README]