Skip to content

Commit

Permalink
update kdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
vkanellopoulos committed Nov 12, 2024
1 parent abb7a24 commit 09c8a50
Show file tree
Hide file tree
Showing 12 changed files with 134 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ val rqesService = RQESService(
authFlowRedirectionURI = URI("rqes:redirect"),
scaBaseURL = URL("https://example.com"),
),
// set the default hash algorithm to use when signing documents
// set the hashing and singing algorithms that will be used
hashAlgorithm = HashAlgorithmOID.SHA_256,
signingAlgorithm = SigningAlgorithmOID.RSA_SHA256,
// optionally provide a HttpClientFactory to create a HttpClient for the service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,17 @@

[androidJvm]\
constructor(serverState: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), client: CSCClient, serviceAccessAuthorized: ServiceAccessAuthorized, hashAlgorithm: HashAlgorithmOID, signingAlgorithm: SigningAlgorithmOID)

Creates an authorized service implementation.

#### Parameters

androidJvm

| | |
|---|---|
| serverState | The server state. |
| client | The client. |
| serviceAccessAuthorized | The service access authorized. |
| hashAlgorithm | The algorithm OID, for hashing the documents. |
| signingAlgorithm | The algorithm OID, for signing the documents. |
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,34 @@

# AuthorizedImpl

[androidJvm]\
class [AuthorizedImpl](index.md)(serverState: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), client: CSCClient, serviceAccessAuthorized: ServiceAccessAuthorized, val hashAlgorithm: HashAlgorithmOID, val signingAlgorithm: SigningAlgorithmOID) : [RQESService.Authorized](../../-r-q-e-s-service/-authorized/index.md)

The authorized service implementation.

#### Parameters

androidJvm

| | |
|---|---|
| serverState | The server state. |
| client | The client. |
| serviceAccessAuthorized | The service access authorized. |
| hashAlgorithm | The algorithm OID, for hashing the documents. |
| signingAlgorithm | The algorithm OID, for signing the documents. |

## Constructors

| | |
|---|---|
| [AuthorizedImpl](-authorized-impl.md) | [androidJvm]<br>constructor(serverState: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), client: CSCClient, serviceAccessAuthorized: ServiceAccessAuthorized, hashAlgorithm: HashAlgorithmOID, signingAlgorithm: SigningAlgorithmOID) |
| [AuthorizedImpl](-authorized-impl.md) | [androidJvm]<br>constructor(serverState: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), client: CSCClient, serviceAccessAuthorized: ServiceAccessAuthorized, hashAlgorithm: HashAlgorithmOID, signingAlgorithm: SigningAlgorithmOID)<br>Creates an authorized service implementation. |

## Properties

| Name | Summary |
|---|---|
| [hashAlgorithm](hash-algorithm.md) | [androidJvm]<br>val [hashAlgorithm](hash-algorithm.md): HashAlgorithmOID |
| [signingAlgorithm](signing-algorithm.md) | [androidJvm]<br>val [signingAlgorithm](signing-algorithm.md): SigningAlgorithmOID |
| [hashAlgorithm](hash-algorithm.md) | [androidJvm]<br>val [hashAlgorithm](hash-algorithm.md): HashAlgorithmOID<br>The algorithm OID, for hashing the documents. |
| [signingAlgorithm](signing-algorithm.md) | [androidJvm]<br>val [signingAlgorithm](signing-algorithm.md): SigningAlgorithmOID<br>The algorithm OID, for signing the documents. |

## Functions

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,17 @@

[androidJvm]\
constructor(client: CSCClient, documentsToSign: [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)&lt;DocumentToSign&gt;, documentDigestList: DocumentDigestList, credentialAuthorized: CredentialAuthorized, signingAlgorithm: SigningAlgorithmOID)

Creates a credential authorized implementation.

#### Parameters

androidJvm

| | |
|---|---|
| client | The client. |
| documentsToSign | The documents to sign. |
| documentDigestList | The document digest list. |
| credentialAuthorized | The credential authorized. |
| signingAlgorithm | The algorithm OID, for signing the documents. |
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,33 @@

# CredentialAuthorizedImpl

[androidJvm]\
class [CredentialAuthorizedImpl](index.md)(client: CSCClient, documentsToSign: [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)&lt;DocumentToSign&gt;, documentDigestList: DocumentDigestList, credentialAuthorized: CredentialAuthorized, val signingAlgorithm: SigningAlgorithmOID) : [RQESService.CredentialAuthorized](../../-r-q-e-s-service/-credential-authorized/index.md)

The credential authorized implementation.

#### Parameters

androidJvm

| | |
|---|---|
| client | The client. |
| documentsToSign | The documents to sign. |
| documentDigestList | The document digest list. |
| credentialAuthorized | The credential authorized. |
| signingAlgorithm | The algorithm OID, for signing the documents. |

## Constructors

| | |
|---|---|
| [CredentialAuthorizedImpl](-credential-authorized-impl.md) | [androidJvm]<br>constructor(client: CSCClient, documentsToSign: [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)&lt;DocumentToSign&gt;, documentDigestList: DocumentDigestList, credentialAuthorized: CredentialAuthorized, signingAlgorithm: SigningAlgorithmOID) |
| [CredentialAuthorizedImpl](-credential-authorized-impl.md) | [androidJvm]<br>constructor(client: CSCClient, documentsToSign: [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)&lt;DocumentToSign&gt;, documentDigestList: DocumentDigestList, credentialAuthorized: CredentialAuthorized, signingAlgorithm: SigningAlgorithmOID)<br>Creates a credential authorized implementation. |

## Properties

| Name | Summary |
|---|---|
| [signingAlgorithm](signing-algorithm.md) | [androidJvm]<br>val [signingAlgorithm](signing-algorithm.md): SigningAlgorithmOID |
| [signingAlgorithm](signing-algorithm.md) | [androidJvm]<br>val [signingAlgorithm](signing-algorithm.md): SigningAlgorithmOID<br>The algorithm OID, for signing the documents. |

## Functions

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ androidJvm
|---|---|
| serviceEndpointUrl | The RQES service endpoint URL. |
| config | The RQES service configuration. |
| hashAlgorithm | The algorithm OID, for hashing the documents. |
| signingAlgorithm | The algorithm OID, for signing the documents. |
| clientFactory | The HTTP client factory. If this property is null, the default HTTP client factory will be used. |
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ androidJvm
|---|---|
| serviceEndpointUrl | The RQES service endpoint URL. |
| config | The RQES service configuration. |
| hashAlgorithm | The algorithm OID, for hashing the documents. |
| signingAlgorithm | The algorithm OID, for signing the documents. |
| clientFactory | The HTTP client factory. If this property is null, the default HTTP client factory will be used. |

## Constructors
Expand All @@ -26,8 +28,8 @@ androidJvm

| Name | Summary |
|---|---|
| [AuthorizedImpl](-authorized-impl/index.md) | [androidJvm]<br>class [AuthorizedImpl](-authorized-impl/index.md)(serverState: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), client: CSCClient, serviceAccessAuthorized: ServiceAccessAuthorized, val hashAlgorithm: HashAlgorithmOID, val signingAlgorithm: SigningAlgorithmOID) : [RQESService.Authorized](../-r-q-e-s-service/-authorized/index.md) |
| [CredentialAuthorizedImpl](-credential-authorized-impl/index.md) | [androidJvm]<br>class [CredentialAuthorizedImpl](-credential-authorized-impl/index.md)(client: CSCClient, documentsToSign: [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)&lt;DocumentToSign&gt;, documentDigestList: DocumentDigestList, credentialAuthorized: CredentialAuthorized, val signingAlgorithm: SigningAlgorithmOID) : [RQESService.CredentialAuthorized](../-r-q-e-s-service/-credential-authorized/index.md) |
| [AuthorizedImpl](-authorized-impl/index.md) | [androidJvm]<br>class [AuthorizedImpl](-authorized-impl/index.md)(serverState: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), client: CSCClient, serviceAccessAuthorized: ServiceAccessAuthorized, val hashAlgorithm: HashAlgorithmOID, val signingAlgorithm: SigningAlgorithmOID) : [RQESService.Authorized](../-r-q-e-s-service/-authorized/index.md)<br>The authorized service implementation. |
| [CredentialAuthorizedImpl](-credential-authorized-impl/index.md) | [androidJvm]<br>class [CredentialAuthorizedImpl](-credential-authorized-impl/index.md)(client: CSCClient, documentsToSign: [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)&lt;DocumentToSign&gt;, documentDigestList: DocumentDigestList, credentialAuthorized: CredentialAuthorized, val signingAlgorithm: SigningAlgorithmOID) : [RQESService.CredentialAuthorized](../-r-q-e-s-service/-credential-authorized/index.md)<br>The credential authorized implementation. |

## Properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,19 @@
operator fun [invoke](invoke.md)(serviceEndpointUrl: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), config: CSCClientConfig, hashAlgorithm: HashAlgorithmOID = HashAlgorithmOID.SHA_256, signingAlgorithm: SigningAlgorithmOID = SigningAlgorithmOID.RSA_SHA256, httpClientFactory: () -&gt; HttpClient? = null): [RQESService](../index.md)

Create the RQES service.

#### Return

The RQES service.

#### Parameters

androidJvm

| | |
|---|---|
| serviceEndpointUrl | The service endpoint URL. |
| config | The CSC client configuration. |
| hashAlgorithm | The hash algorithm OID. |
| signingAlgorithm | The signing algorithm OID. |
| httpClientFactory | The HTTP client factory. |
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,13 @@ interface RQESService {
companion object {
/**
* Create the RQES service.
*
* @param serviceEndpointUrl The service endpoint URL.
* @param config The CSC client configuration.
* @param hashAlgorithm The hash algorithm OID.
* @param signingAlgorithm The signing algorithm OID.
* @param httpClientFactory The HTTP client factory.
* @return The RQES service.
*/
operator fun invoke(
serviceEndpointUrl: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,15 @@ import kotlin.uuid.Uuid
*
* @property serviceEndpointUrl The RQES service endpoint URL.
* @property config The RQES service configuration.
* @property hashAlgorithm The algorithm OID, for hashing the documents.
* @property signingAlgorithm The algorithm OID, for signing the documents.
* @property clientFactory The HTTP client factory. If this property is null, the default HTTP client factory will be used.
*
* @constructor Creates a RQES service implementation.
* @param serviceEndpointUrl The RQES service endpoint URL.
* @param config The RQES service configuration.
* @param hashAlgorithm The algorithm OID, for hashing the documents.
* @param signingAlgorithm The algorithm OID, for signing the documents.
* @param clientFactory The HTTP client factory. If this property is null, the default HTTP client factory will be used.
*/
class RQESServiceImpl(
Expand Down Expand Up @@ -145,6 +149,25 @@ class RQESServiceImpl(
}


/**
* The authorized service implementation.
*
* @property serverState The server state.
* @property client The client.
* @property serviceAccessAuthorized The service access authorized.
* @property hashAlgorithm The algorithm OID, for hashing the documents.
* @property signingAlgorithm The algorithm OID, for signing the documents.
* @property documentsToSign The documents to sign.
* @property documentDigestList The document digest list.
* @property credAuthRequestPrepared The credential authorization request prepared.
*
* @constructor Creates an authorized service implementation.
* @param serverState The server state.
* @param client The client.
* @param serviceAccessAuthorized The service access authorized.
* @param hashAlgorithm The algorithm OID, for hashing the documents.
* @param signingAlgorithm The algorithm OID, for signing the documents.
*/
class AuthorizedImpl(
@VisibleForTesting internal val serverState: String,
@VisibleForTesting internal val client: CSCClient,
Expand Down Expand Up @@ -236,6 +259,22 @@ class RQESServiceImpl(
}
}

/**
* The credential authorized implementation.
*
* @property client The client.
* @property documentsToSign The documents to sign.
* @property documentDigestList The document digest list.
* @property credentialAuthorized The credential authorized.
* @property signingAlgorithm The algorithm OID, for signing the documents.
*
* @constructor Creates a credential authorized implementation.
* @param client The client.
* @param documentsToSign The documents to sign.
* @param documentDigestList The document digest list.
* @param credentialAuthorized The credential authorized.
* @param signingAlgorithm The algorithm OID, for signing the documents.
*/
class CredentialAuthorizedImpl(
@VisibleForTesting internal val client: CSCClient,
@VisibleForTesting internal val documentsToSign: List<DocumentToSign>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ data class UnsignedDocument(

/**
* Converts this [UnsignedDocument] to a [DocumentToSign].
* @param signingAlgorithmOID The signing algorithm OID.
* @return The [DocumentToSign] object.
*/
internal fun asDocumentToSign(signingAlgorithmOID: SigningAlgorithmOID): DocumentToSign =
DocumentToSign(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ class UnsignedDocuments(

/**
* Converts this [UnsignedDocuments] to a list of [DocumentToSign]s.
* @param signingAlgorithmOID The OID of the signing algorithm to be used for the signing process.
* @return The list of [DocumentToSign]s.
*/
internal fun asDocumentToSignList(
signingAlgorithmOID: SigningAlgorithmOID
Expand Down

0 comments on commit 09c8a50

Please sign in to comment.