Skip to content

Commit

Permalink
Merge pull request #41 from niscy-eudiw/feature/no-par-support-updates
Browse files Browse the repository at this point in the history
[fix] par updates
  • Loading branch information
dtsiflit authored Jun 10, 2024
2 parents 9251358 + 94fcbfd commit 16bb865
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Sources/Main/Authorisers/AuthorizationServerClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,11 @@ public actor AuthorizationServerClient: AuthorizationServerClientType {

guard let urlWithParams = authorizationEndpoint.appendingQueryParameters(
try authzRequest.toDictionary().convertToDictionaryOfStrings(
excludingKeys: ["scope", "credential_configuration_ids"]
excludingKeys: [
"credential_configuration_ids",
"code_challenge",
"code_challenge_method"
]
)
) else {
throw ValidationError.invalidUrl(parEndpoint.absoluteString)
Expand Down
5 changes: 5 additions & 0 deletions Sources/Utilities/RemoteDataAccess/Poster.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public enum PostError: LocalizedError {
case networkError(Error)
case response(GenericErrorResponse)
case cannotParse(String)
case serverError

/**
Provides a localized description of the post error.
Expand All @@ -36,6 +37,8 @@ public enum PostError: LocalizedError {
return "Generic error response"
case .cannotParse(let string):
return "Could not parse: \(string)"
case .serverError:
return "Server error"
}
}
}
Expand Down Expand Up @@ -93,6 +96,8 @@ public struct Poster: PostingType {
if statusCode >= 400 && statusCode < 500 {
let object = try JSONDecoder().decode(GenericErrorResponse.self, from: data)
return .failure(.response(object))
} else if statusCode >= 500 && statusCode < 599 {
return .failure(.serverError)
}

do {
Expand Down

0 comments on commit 16bb865

Please sign in to comment.