diff --git a/src/SmartId/CertificateRequestBuilder.cs b/src/SmartId/CertificateRequestBuilder.cs index 6e50d11..7719906 100644 --- a/src/SmartId/CertificateRequestBuilder.cs +++ b/src/SmartId/CertificateRequestBuilder.cs @@ -264,9 +264,9 @@ public async Task InitiateCertificateChoiceAsync(CancellationToken cance /// This method uses automatic session status polling internally and therefore blocks the current thread until certificate choice is concluded/interupted etc. /// session status response /// the authentication response - /// when the user has refused the session. NB! This exception has subclasses to determine the screen where user pressed cancel. + /// when there was a timeout, i.e. end user did not confirm or refuse the operation within given timeframe + /// when for some reason, this relying party request cannot be completed. public SmartIdCertificate CreateSmartIdCertificate(SessionStatus sessionStatus) { ValidateCertificateResponse(sessionStatus); diff --git a/src/SmartId/SignatureRequestBuilder.cs b/src/SmartId/SignatureRequestBuilder.cs index b7c3ef4..d22365b 100644 --- a/src/SmartId/SignatureRequestBuilder.cs +++ b/src/SmartId/SignatureRequestBuilder.cs @@ -76,185 +76,185 @@ public SignatureRequestBuilder(ISmartIdConnector connector, SessionStatusPoller { } - /** - * Sets the request's UUID of the relying party - * - * If not for explicit need, it is recommended to use - * {@link ee.sk.smartid.SmartIdClient#setRelyingPartyUUID(String)} - * instead. In that case when getting the builder from - * {@link ee.sk.smartid.SmartIdClient} it is not required - * to set the UUID every time when building a new request. - * - * @param relyingPartyUUID UUID of the relying party - * @return this builder - */ + /// + /// Sets the request's UUID of the relying party + /// + /// If not for explicit need, it is recommended to use + /// + /// instead. In that case when getting the builder from + /// it is not required + /// to set the UUID every time when building a new request. + /// + /// + /// UUID of the relying party + /// this builder public SignatureRequestBuilder WithRelyingPartyUUID(string relyingPartyUUID) { RelyingPartyUUID = relyingPartyUUID; return this; } - /** - * Sets the request's name of the relying party - * - * If not for explicit need, it is recommended to use - * {@link ee.sk.smartid.SmartIdClient#setRelyingPartyName(String)} - * instead. In that case when getting the builder from - * {@link ee.sk.smartid.SmartIdClient} it is not required - * to set name every time when building a new request. - * - * @param relyingPartyName name of the relying party - * @return this builder - */ + /// + /// Sets the request's name of the relying party + /// + /// If not for explicit need, it is recommended to use + /// + /// instead. In that case when getting the builder from + /// it is not required + /// to set name every time when building a new request. + /// + /// + /// name of the relying party + /// this builder public SignatureRequestBuilder WithRelyingPartyName(string relyingPartyName) { RelyingPartyName = relyingPartyName; return this; } - /** - * Sets the request's document number - * - * Document number is unique for the user's certificate/device - * that is used for the signing. - * - * @param documentNumber document number of the certificate/device used to sign - * @return this builder - */ + /// + /// Sets the request's document number + /// + /// Document number is unique for the user's certificate/device + /// that is used for the authentication. + /// + /// + /// document number of the certificate/device used to sign + /// this builder public SignatureRequestBuilder WithDocumentNumber(string documentNumber) { DocumentNumber = documentNumber; return this; } - /** - * Sets the request's personal semantics identifier - * - * Semantics identifier consists of identity type, country code, a hyphen and the identifier. - * - * @param semanticsIdentifierAsString semantics identifier for a person - * @return this builder - */ + /// + /// Sets the request's personal semantics identifier + /// + /// Semantics identifier consists of identity type, country code, a hyphen and the identifier. + /// + /// + /// semantics identifier for a person + /// this builder public SignatureRequestBuilder WithSemanticsIdentifierAsString(string semanticsIdentifierAsString) { SemanticsIdentifier = new SemanticsIdentifier(semanticsIdentifierAsString); return this; } - /** - * Sets the request's personal semantics identifier - * - * Semantics identifier consists of identity type, country code, and the identifier. - * - * @param semanticsIdentifier semantics identifier for a person - * @return this builder - */ + /// + /// Sets the request's personal semantics identifier + /// + /// Semantics identifier consists of identity type, country code, and the identifier. + /// + /// + /// semantics identifier for a person + /// this builder public SignatureRequestBuilder WithSemanticsIdentifier(SemanticsIdentifier semanticsIdentifier) { SemanticsIdentifier = semanticsIdentifier; return this; } - /** - * Sets the data of the document to be signed - * - * This method could be used when the data - * to be signed is not in hashed format. - * {@link ee.sk.smartid.SignableData#setHashType(HashType)} - * can be used to select the wanted hash type - * and the data is hashed for you. - * - * @param dataToSign dat to be signed - * @return this builder - */ + /// + /// Sets the data of the document to be signed + /// + /// This method could be used when the data + /// to be signed is not in hashed format. + /// + /// can be used to select the wanted hash type + /// and the data is hashed for you. + /// + /// + /// + /// data to be signed + /// this builder public SignatureRequestBuilder WithSignableData(SignableData dataToSign) { base.dataToSign = dataToSign; return this; } - /** - * Sets the hash to be signed - * - * This method could be used when the data - * to be signed is in hashed format. - * - * @param hashToSign hash to be signed - * @return this builder - */ + /// + /// Sets the hash to be signed + /// + /// This method could be used when the data + /// to be signed is in hashed format. + /// + /// + /// hash to be signed + /// this builder public SignatureRequestBuilder WithSignableHash(SignableHash hashToSign) { base.hashToSign = hashToSign; return this; } - /** - * Sets the request's certificate level - * - * Defines the minimum required level of the certificate. - * Optional. When not set, it defaults to what is configured - * on the server side i.e. "QUALIFIED". - * - * @param certificateLevel the level of the certificate - * @return this builder - */ + /// + /// Sets the request's certificate level + /// + /// Defines the minimum required level of the certificate. + /// Optional. When not set, it defaults to what is configured + /// on the server side i.e. "QUALIFIED". + /// + /// + /// the level of the certificate + /// this builder public SignatureRequestBuilder WithCertificateLevel(string certificateLevel) { CertificateLevel = certificateLevel; return this; } - /** - * Sets the request's nonce - * - * By default the signature's initiation request - * has idempotent behaviour meaning when the request - * is repeated inside a given time frame with exactly - * the same parameters, session ID of an existing session - * can be returned as a result. When requester wants, it can - * override the idempotent behaviour inside of this time frame - * using an optional "nonce" parameter present for all POST requests. - * - * Normally, this parameter can be omitted. - * - * @param nonce nonce of the request - * @return this builder - */ + /// + /// Sets the request's nonce + /// + /// By default the authentication's initiation request + /// has idempotent behaviour meaning when the request + /// is repeated inside a given time frame with exactly + /// the same parameters, session ID of an existing session + /// can be returned as a result.When requester wants, it can + /// override the idempotent behaviour inside of this time frame + /// using an optional "nonce" parameter present for all POST requests. + /// + /// + /// Normally, this parameter can be omitted. + /// + /// + /// nonce of the request + /// this builder public SignatureRequestBuilder WithNonce(string nonce) { Nonce = nonce; return this; } - /** - * Specifies capabilities of the user - * - * By default there are no specified capabilities. - * The capabilities need to be specified in case of - * a restricted Smart ID user - * {@link #withCapabilities(String...)} - * @param capabilities are specified capabilities for a restricted Smart ID user - * and is one of [QUALIFIED, ADVANCED] - * @return this builder - */ + /// + /// Specifies capabilities of the user + /// + /// By default there are no specified capabilities. + /// The capabilities need to be specified in case of + /// a restricted Smart ID user + /// + /// + /// + /// are specified capabilities for a restricted Smart ID user and is one of [QUALIFIED, ADVANCED] + /// this builder public SignatureRequestBuilder WithCapabilities(params Capability[] capabilities) { this.capabilities = new HashSet(capabilities.Select(x => x.ToString())); return this; } - /** - * Specifies capabilities of the user - * - * - * By default there are no specified capabilities. - * The capabilities need to be specified in case of - * a restricted Smart ID user - * {@link #withCapabilities(Capability...)} - * @param capabilities are specified capabilities for a restricted Smart ID user - * and is one of ["QUALIFIED", "ADVANCED"] - * @return this builder - */ + /// + /// Specifies capabilities of the user + /// + /// By default there are no specified capabilities. + /// The capabilities need to be specified in case of + /// a restricted Smart ID user + /// + /// + /// are specified capabilities for a restricted Smart ID user and is one of ["QUALIFIED", "ADVANCED"] + /// this builder public SignatureRequestBuilder WithCapabilities(params string[] capabilities) { this.capabilities = new HashSet(capabilities);