mirror of
https://github.com/openziti/zrok.git
synced 2025-06-22 18:51:33 +02:00
parent
4e81bbf80b
commit
fa8200a603
@ -46,5 +46,5 @@ func (cmd *adminCreateAccount) run(_ *cobra.Command, args []string) {
|
|||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println(resp.GetPayload().Token)
|
fmt.Println(resp.GetPayload().AccountToken)
|
||||||
}
|
}
|
||||||
|
@ -55,5 +55,5 @@ func (h *createAccountHandler) Handle(params admin.CreateAccountParams, principa
|
|||||||
|
|
||||||
logrus.Infof("administratively created account '%v'", params.Body.Email)
|
logrus.Infof("administratively created account '%v'", params.Body.Email)
|
||||||
|
|
||||||
return admin.NewCreateAccountCreated().WithPayload(&admin.CreateAccountCreatedBody{Token: token})
|
return admin.NewCreateAccountCreated().WithPayload(&admin.CreateAccountCreatedBody{AccountToken: token})
|
||||||
}
|
}
|
||||||
|
@ -273,8 +273,8 @@ swagger:model CreateAccountCreatedBody
|
|||||||
*/
|
*/
|
||||||
type CreateAccountCreatedBody struct {
|
type CreateAccountCreatedBody struct {
|
||||||
|
|
||||||
// token
|
// account token
|
||||||
Token string `json:"token,omitempty"`
|
AccountToken string `json:"accountToken,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate validates this create account created body
|
// Validate validates this create account created body
|
||||||
|
@ -120,7 +120,7 @@ func init() {
|
|||||||
"description": "created",
|
"description": "created",
|
||||||
"schema": {
|
"schema": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"token": {
|
"accountToken": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2317,7 +2317,7 @@ func init() {
|
|||||||
"description": "created",
|
"description": "created",
|
||||||
"schema": {
|
"schema": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"token": {
|
"accountToken": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -118,8 +118,8 @@ func (o *CreateAccountBody) UnmarshalBinary(b []byte) error {
|
|||||||
// swagger:model CreateAccountCreatedBody
|
// swagger:model CreateAccountCreatedBody
|
||||||
type CreateAccountCreatedBody struct {
|
type CreateAccountCreatedBody struct {
|
||||||
|
|
||||||
// token
|
// account token
|
||||||
Token string `json:"token,omitempty"`
|
AccountToken string `json:"accountToken,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate validates this create account created body
|
// Validate validates this create account created body
|
||||||
|
@ -26,6 +26,7 @@ import { ListFrontends200ResponseInner } from '../model/listFrontends200Response
|
|||||||
import { ListOrganizationMembers200Response } from '../model/listOrganizationMembers200Response';
|
import { ListOrganizationMembers200Response } from '../model/listOrganizationMembers200Response';
|
||||||
import { ListOrganizations200Response } from '../model/listOrganizations200Response';
|
import { ListOrganizations200Response } from '../model/listOrganizations200Response';
|
||||||
import { LoginRequest } from '../model/loginRequest';
|
import { LoginRequest } from '../model/loginRequest';
|
||||||
|
import { RegenerateAccountToken200Response } from '../model/regenerateAccountToken200Response';
|
||||||
import { RemoveOrganizationMemberRequest } from '../model/removeOrganizationMemberRequest';
|
import { RemoveOrganizationMemberRequest } from '../model/removeOrganizationMemberRequest';
|
||||||
import { UpdateFrontendRequest } from '../model/updateFrontendRequest';
|
import { UpdateFrontendRequest } from '../model/updateFrontendRequest';
|
||||||
import { Verify200Response } from '../model/verify200Response';
|
import { Verify200Response } from '../model/verify200Response';
|
||||||
@ -165,7 +166,7 @@ export class AdminApi {
|
|||||||
*
|
*
|
||||||
* @param body
|
* @param body
|
||||||
*/
|
*/
|
||||||
public async createAccount (body?: LoginRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: VerifyRequest; }> {
|
public async createAccount (body?: LoginRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: RegenerateAccountToken200Response; }> {
|
||||||
const localVarPath = this.basePath + '/account';
|
const localVarPath = this.basePath + '/account';
|
||||||
let localVarQueryParameters: any = {};
|
let localVarQueryParameters: any = {};
|
||||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||||
@ -211,13 +212,13 @@ export class AdminApi {
|
|||||||
localVarRequestOptions.form = localVarFormParams;
|
localVarRequestOptions.form = localVarFormParams;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new Promise<{ response: http.IncomingMessage; body: VerifyRequest; }>((resolve, reject) => {
|
return new Promise<{ response: http.IncomingMessage; body: RegenerateAccountToken200Response; }>((resolve, reject) => {
|
||||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
reject(error);
|
reject(error);
|
||||||
} else {
|
} else {
|
||||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||||
body = ObjectSerializer.deserialize(body, "VerifyRequest");
|
body = ObjectSerializer.deserialize(body, "RegenerateAccountToken200Response");
|
||||||
resolve({ response: response, body: body });
|
resolve({ response: response, body: body });
|
||||||
} else {
|
} else {
|
||||||
reject(new HttpError(response, body, response.statusCode));
|
reject(new HttpError(response, body, response.statusCode));
|
||||||
|
@ -70,7 +70,7 @@ void (empty response body)
|
|||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **create_account**
|
# **create_account**
|
||||||
> VerifyBody create_account(body=body)
|
> InlineResponse200 create_account(body=body)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -107,7 +107,7 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
[**VerifyBody**](VerifyBody.md)
|
[**InlineResponse200**](InlineResponse200.md)
|
||||||
|
|
||||||
### Authorization
|
### Authorization
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ class AdminApi(object):
|
|||||||
|
|
||||||
:param async_req bool
|
:param async_req bool
|
||||||
:param AccountBody body:
|
:param AccountBody body:
|
||||||
:return: VerifyBody
|
:return: InlineResponse200
|
||||||
If the method is called asynchronously,
|
If the method is called asynchronously,
|
||||||
returns the request thread.
|
returns the request thread.
|
||||||
"""
|
"""
|
||||||
@ -152,7 +152,7 @@ class AdminApi(object):
|
|||||||
|
|
||||||
:param async_req bool
|
:param async_req bool
|
||||||
:param AccountBody body:
|
:param AccountBody body:
|
||||||
:return: VerifyBody
|
:return: InlineResponse200
|
||||||
If the method is called asynchronously,
|
If the method is called asynchronously,
|
||||||
returns the request thread.
|
returns the request thread.
|
||||||
"""
|
"""
|
||||||
@ -206,7 +206,7 @@ class AdminApi(object):
|
|||||||
body=body_params,
|
body=body_params,
|
||||||
post_params=form_params,
|
post_params=form_params,
|
||||||
files=local_var_files,
|
files=local_var_files,
|
||||||
response_type='VerifyBody', # noqa: E501
|
response_type='InlineResponse200', # noqa: E501
|
||||||
auth_settings=auth_settings,
|
auth_settings=auth_settings,
|
||||||
async_req=params.get('async_req'),
|
async_req=params.get('async_req'),
|
||||||
_return_http_data_only=params.get('_return_http_data_only'),
|
_return_http_data_only=params.get('_return_http_data_only'),
|
||||||
|
@ -245,7 +245,7 @@ paths:
|
|||||||
description: created
|
description: created
|
||||||
schema:
|
schema:
|
||||||
properties:
|
properties:
|
||||||
token:
|
accountToken:
|
||||||
type: string
|
type: string
|
||||||
401:
|
401:
|
||||||
description: unauthorized
|
description: unauthorized
|
||||||
|
@ -26,6 +26,7 @@ import type {
|
|||||||
ListOrganizationMembers200Response,
|
ListOrganizationMembers200Response,
|
||||||
ListOrganizations200Response,
|
ListOrganizations200Response,
|
||||||
LoginRequest,
|
LoginRequest,
|
||||||
|
RegenerateAccountToken200Response,
|
||||||
RemoveOrganizationMemberRequest,
|
RemoveOrganizationMemberRequest,
|
||||||
UpdateFrontendRequest,
|
UpdateFrontendRequest,
|
||||||
Verify200Response,
|
Verify200Response,
|
||||||
@ -54,6 +55,8 @@ import {
|
|||||||
ListOrganizations200ResponseToJSON,
|
ListOrganizations200ResponseToJSON,
|
||||||
LoginRequestFromJSON,
|
LoginRequestFromJSON,
|
||||||
LoginRequestToJSON,
|
LoginRequestToJSON,
|
||||||
|
RegenerateAccountToken200ResponseFromJSON,
|
||||||
|
RegenerateAccountToken200ResponseToJSON,
|
||||||
RemoveOrganizationMemberRequestFromJSON,
|
RemoveOrganizationMemberRequestFromJSON,
|
||||||
RemoveOrganizationMemberRequestToJSON,
|
RemoveOrganizationMemberRequestToJSON,
|
||||||
UpdateFrontendRequestFromJSON,
|
UpdateFrontendRequestFromJSON,
|
||||||
@ -149,7 +152,7 @@ export class AdminApi extends runtime.BaseAPI {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
async createAccountRaw(requestParameters: CreateAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VerifyRequest>> {
|
async createAccountRaw(requestParameters: CreateAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RegenerateAccountToken200Response>> {
|
||||||
const queryParameters: any = {};
|
const queryParameters: any = {};
|
||||||
|
|
||||||
const headerParameters: runtime.HTTPHeaders = {};
|
const headerParameters: runtime.HTTPHeaders = {};
|
||||||
@ -168,12 +171,12 @@ export class AdminApi extends runtime.BaseAPI {
|
|||||||
body: LoginRequestToJSON(requestParameters['body']),
|
body: LoginRequestToJSON(requestParameters['body']),
|
||||||
}, initOverrides);
|
}, initOverrides);
|
||||||
|
|
||||||
return new runtime.JSONApiResponse(response, (jsonValue) => VerifyRequestFromJSON(jsonValue));
|
return new runtime.JSONApiResponse(response, (jsonValue) => RegenerateAccountToken200ResponseFromJSON(jsonValue));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
async createAccount(requestParameters: CreateAccountRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VerifyRequest> {
|
async createAccount(requestParameters: CreateAccountRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RegenerateAccountToken200Response> {
|
||||||
const response = await this.createAccountRaw(requestParameters, initOverrides);
|
const response = await this.createAccountRaw(requestParameters, initOverrides);
|
||||||
return await response.value();
|
return await response.value();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user