Skip to content

Commit

Permalink
Regenerate Petstore source code.
Browse files Browse the repository at this point in the history
  • Loading branch information
noordawod committed Dec 24, 2021
1 parent 5493205 commit 2683665
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ class ApiKeyAuth implements Authentication {

@override
void applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams) {
apiKeyPrefix = apiKeyPrefix.trim();

final paramValue = (apiKeyPrefix.isEmpty ? apiKey : '$apiKeyPrefix $apiKey').trim();
final paramValue = apiKeyPrefix.isEmpty ? apiKey : '$apiKeyPrefix $apiKey';

if (paramValue.isNotEmpty) {
if (location == 'query') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ class HttpBasicAuth implements Authentication {

@override
void applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams) {
username = username.trim();
password = password.trim();

if (username.isNotEmpty && password.isNotEmpty) {
final credentials = '$username:$password';
headerParams['Authorization'] = 'Basic ${base64.encode(utf8.encode(credentials))}';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ class HttpBearerAuth implements Authentication {
return;
}

accessToken = accessToken.trim();

if (accessToken.isNotEmpty) {
headerParams['Authorization'] = 'Bearer $accessToken';
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class OAuth implements Authentication {

@override
void applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams) {
accessToken = accessToken.trim();
if (accessToken.isNotEmpty) {
headerParams['Authorization'] = 'Bearer $accessToken';
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ class ApiKeyAuth implements Authentication {

@override
void applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams) {
apiKeyPrefix = apiKeyPrefix.trim();

final paramValue = (apiKeyPrefix.isEmpty ? apiKey : '$apiKeyPrefix $apiKey').trim();
final paramValue = apiKeyPrefix.isEmpty ? apiKey : '$apiKeyPrefix $apiKey';

if (paramValue.isNotEmpty) {
if (location == 'query') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ class HttpBasicAuth implements Authentication {

@override
void applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams) {
username = username.trim();
password = password.trim();

if (username.isNotEmpty && password.isNotEmpty) {
final credentials = '$username:$password';
headerParams['Authorization'] = 'Basic ${base64.encode(utf8.encode(credentials))}';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ class HttpBearerAuth implements Authentication {
return;
}

accessToken = accessToken.trim();

if (accessToken.isNotEmpty) {
headerParams['Authorization'] = 'Bearer $accessToken';
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class OAuth implements Authentication {

@override
void applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams) {
accessToken = accessToken.trim();
if (accessToken.isNotEmpty) {
headerParams['Authorization'] = 'Bearer $accessToken';
}
Expand Down

0 comments on commit 2683665

Please sign in to comment.