Skip to content

Latest commit

 

History

History
285 lines (187 loc) · 8.79 KB

TwoFactorAuthV1alpha1UcApi.md

File metadata and controls

285 lines (187 loc) · 8.79 KB

halo_client.api.TwoFactorAuthV1alpha1UcApi

Load the API package

import 'package:halo_client/api.dart';

All URIs are relative to http://localhost:8091

Method HTTP request Description
configurerTotp POST /apis/uc.api.security.halo.run/v1alpha1/authentications/two-factor/totp
deleteTotp DELETE /apis/uc.api.security.halo.run/v1alpha1/authentications/two-factor/totp/-
disableTwoFactor PUT /apis/uc.api.security.halo.run/v1alpha1/authentications/two-factor/settings/disabled
enableTwoFactor PUT /apis/uc.api.security.halo.run/v1alpha1/authentications/two-factor/settings/enabled
getTotpAuthLink GET /apis/uc.api.security.halo.run/v1alpha1/authentications/two-factor/totp/auth-link
getTwoFactorAuthenticationSettings GET /apis/uc.api.security.halo.run/v1alpha1/authentications/two-factor/settings

configurerTotp

TwoFactorAuthSettings configurerTotp(totpRequest)

Configure a TOTP

Example

import 'package:halo_client/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';

final api = HaloClient().getTwoFactorAuthV1alpha1UcApi();
final TotpRequest totpRequest = ; // TotpRequest | 

try {
    final response = api.configurerTotp(totpRequest);
    print(response);
} catch on DioException (e) {
    print('Exception when calling TwoFactorAuthV1alpha1UcApi->configurerTotp: $e\n');
}

Parameters

Name Type Description Notes
totpRequest TotpRequest [optional]

Return type

TwoFactorAuthSettings

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteTotp

TwoFactorAuthSettings deleteTotp(passwordRequest)

Example

import 'package:halo_client/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';

final api = HaloClient().getTwoFactorAuthV1alpha1UcApi();
final PasswordRequest passwordRequest = ; // PasswordRequest | 

try {
    final response = api.deleteTotp(passwordRequest);
    print(response);
} catch on DioException (e) {
    print('Exception when calling TwoFactorAuthV1alpha1UcApi->deleteTotp: $e\n');
}

Parameters

Name Type Description Notes
passwordRequest PasswordRequest [optional]

Return type

TwoFactorAuthSettings

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]

disableTwoFactor

TwoFactorAuthSettings disableTwoFactor(passwordRequest)

Disable Two-factor authentication

Example

import 'package:halo_client/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';

final api = HaloClient().getTwoFactorAuthV1alpha1UcApi();
final PasswordRequest passwordRequest = ; // PasswordRequest | 

try {
    final response = api.disableTwoFactor(passwordRequest);
    print(response);
} catch on DioException (e) {
    print('Exception when calling TwoFactorAuthV1alpha1UcApi->disableTwoFactor: $e\n');
}

Parameters

Name Type Description Notes
passwordRequest PasswordRequest [optional]

Return type

TwoFactorAuthSettings

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]

enableTwoFactor

TwoFactorAuthSettings enableTwoFactor(passwordRequest)

Enable Two-factor authentication

Example

import 'package:halo_client/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';

final api = HaloClient().getTwoFactorAuthV1alpha1UcApi();
final PasswordRequest passwordRequest = ; // PasswordRequest | 

try {
    final response = api.enableTwoFactor(passwordRequest);
    print(response);
} catch on DioException (e) {
    print('Exception when calling TwoFactorAuthV1alpha1UcApi->enableTwoFactor: $e\n');
}

Parameters

Name Type Description Notes
passwordRequest PasswordRequest [optional]

Return type

TwoFactorAuthSettings

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getTotpAuthLink

TotpAuthLinkResponse getTotpAuthLink()

Get TOTP auth link, including secret

Example

import 'package:halo_client/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';

final api = HaloClient().getTwoFactorAuthV1alpha1UcApi();

try {
    final response = api.getTotpAuthLink();
    print(response);
} catch on DioException (e) {
    print('Exception when calling TwoFactorAuthV1alpha1UcApi->getTotpAuthLink: $e\n');
}

Parameters

This endpoint does not need any parameter.

Return type

TotpAuthLinkResponse

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getTwoFactorAuthenticationSettings

TwoFactorAuthSettings getTwoFactorAuthenticationSettings()

Get Two-factor authentication settings.

Example

import 'package:halo_client/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';

final api = HaloClient().getTwoFactorAuthV1alpha1UcApi();

try {
    final response = api.getTwoFactorAuthenticationSettings();
    print(response);
} catch on DioException (e) {
    print('Exception when calling TwoFactorAuthV1alpha1UcApi->getTwoFactorAuthenticationSettings: $e\n');
}

Parameters

This endpoint does not need any parameter.

Return type

TwoFactorAuthSettings

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]