open-project-flutter-api/doc/OAuth2Api.md
2023-11-05 19:54:17 +01:00

3.4 KiB

openapi.api.OAuth2Api

Load the API package

import 'package:openapi/api.dart';

All URIs are relative to https://community.openproject.org

Method HTTP request Description
getOauthApplication GET /api/v3/oauth_applications/{id} Get the oauth application.
getOauthClientCredentials GET /api/v3/oauth_client_credentials/{id} Get the oauth client credentials object.

getOauthApplication

OAuthApplicationReadModel getOauthApplication(id)

Get the oauth application.

Retrieves the OAuth 2 provider application for the given identifier. The secret will not be part of the response, instead a confidential flag is indicating, whether there is a secret or not.

Example

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

final api_instance = OAuth2Api();
final id = 1337; // int | OAuth application id

try {
    final result = api_instance.getOauthApplication(id);
    print(result);
} catch (e) {
    print('Exception when calling OAuth2Api->getOauthApplication: $e\n');
}

Parameters

Name Type Description Notes
id int OAuth application id

Return type

OAuthApplicationReadModel

Authorization

BasicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/hal+json

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

getOauthClientCredentials

OAuthClientCredentialsReadModel getOauthClientCredentials(id)

Get the oauth client credentials object.

Retrieves the OAuth 2 client credentials for the given identifier. The secret will not be part of the response, instead a confidential flag is indicating, whether there is a secret or not.

Example

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

final api_instance = OAuth2Api();
final id = 1337; // int | OAuth Client Credentials id

try {
    final result = api_instance.getOauthClientCredentials(id);
    print(result);
} catch (e) {
    print('Exception when calling OAuth2Api->getOauthClientCredentials: $e\n');
}

Parameters

Name Type Description Notes
id int OAuth Client Credentials id

Return type

OAuthClientCredentialsReadModel

Authorization

BasicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/hal+json

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