Skip to content

Commit

Permalink
Introduce Dokka API doc generator
Browse files Browse the repository at this point in the history
  • Loading branch information
tamas-toth committed Aug 2, 2024
1 parent 9ca6555 commit 6276be6
Show file tree
Hide file tree
Showing 91 changed files with 1,070 additions and 598 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,17 @@ The application is written in [Kotlin](https://developer.android.com/kotlin).

[Timber](https://github.com/JakeWharton/timber) is used to display logs describing the steps of the operations. The logs are presented to help understand the flow of the operations managed by the SDK.

### KDoc & Dokka

The source code is documented using [KDoc](https://kotlinlang.org/docs/kotlin-doc.html) syntax. [Dokka](https://kotlinlang.org/docs/dokka-introduction.html) is an API documentation engine for Kotlin.
Documentation can be generated by running:

```bash
./gradlew dokkaHtml dokkaHtmlMultiModule
```

The output can be found in the `build/dokka/htmlMultiModule` folder.

## Integration Notes

In this section you can find hints about how the Nevis Mobile Authentication SDK is integrated into the example app.
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@ dependencies {
def retrofit_version = "2.9.0"
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
implementation "com.squareup.retrofit2:converter-gson:$retrofit_version"
}
}
217 changes: 217 additions & 0 deletions app/module.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
# Module nevis-mobile-authentication-example-app

## Description

The example app demonstrating how to use the Nevis Mobile Authentication SDK in an Android mobile application.
The Nevis Mobile Authentication SDK allows you to integrate passwordless authentication to your existing mobile app, backed by the FIDO UAF 1.1 Standard.

Some SDK features demonstrated in this example app are:

- Using the SDK with the Nevis Authentication Cloud
- Registering with QR code & app link URIs
- Simulating in-band authentication after registration
- Deregistering a registered account
- Changing the PIN of the PIN authenticator
- Changing the device information

Please note that the example app only demonstrates a subset of the available SDK features. The main purpose is to demonstrate how the SDK can be used, not to cover all supported scenarios.

# Package ch.nevis.exampleapp.application

This package contains a sub-class of `Application` to enable Dagger Hilt capabilities and to initialize logging.

# Package ch.nevis.exampleapp.common.configuration

This package contains the configuration possibilities of the Nevis Mobile Authentication SDK.

# Package ch.nevis.exampleapp.common.error

This package contains the error handling related classes.

# Package ch.nevis.exampleapp.common.settings

This package contains the application settings possibilities.

# Package ch.nevis.exampleapp.dagger

This package contains the main Dagger Hilt configuration module.

# Package ch.nevis.exampleapp.domain.client

This package contains the `MobileAuthenticationClient` provider.

# Package ch.nevis.exampleapp.domain.deviceInformation

This package contains the `DeviceInformation` factory.

# Package ch.nevis.exampleapp.domain.interaction

This package contains the default implementation of interaction related interfaces from the Nevis Mobile Authentication SDK, like account and authenticator selection and user verification.

# Package ch.nevis.exampleapp.domain.interaction.password

This package contains the default implementation of password interaction related interfaces from the Nevis Mobile Authentication SDK, like changing, enrolling and verifying the password.

# Package ch.nevis.exampleapp.domain.interaction.pin

This package contains the default implementation of PIN interaction related interfaces from the Nevis Mobile Authentication SDK, like changing, enrolling and verifying the PIN.

# Package ch.nevis.exampleapp.domain.log

This package contains logging related implementations.

# Package ch.nevis.exampleapp.domain.model.error

This package contains error handling related model definitions.

# Package ch.nevis.exampleapp.domain.model.operation

This package contains operation related model definitions.

# Package ch.nevis.exampleapp.domain.model.sdk

This package contains Nevis Mobile Authentication SDK related model definitions.

# Package ch.nevis.exampleapp.domain.util

This package contains Nevis Mobile Authentication SDK related extension definitions.

# Package ch.nevis.exampleapp.domain.validation

This package contains validation related logic.

# Package ch.nevis.exampleapp.logging

This package contains the `Timber` logging framework integration.

# Package ch.nevis.exampleapp.retrofit

This package contains the `Retrofit` networking framework integration.

# Package ch.nevis.exampleapp.retrofit.model

This package contains the `Retrofit` model definitions.

# Package ch.nevis.exampleapp.ui.authCloudRegistration

This package contains the view and view model definitions for the Auth Cloud API Registration operation.

# Package ch.nevis.exampleapp.ui.base

This package contains the base view and view model definitions.

# Package ch.nevis.exampleapp.ui.base.model

This package contains the base navigation parameter and view data definitions.

# Package ch.nevis.exampleapp.ui.changeDeviceInformation

This package contains the view and view model definitions for the Change Device Information operation.

# Package ch.nevis.exampleapp.ui.changeDeviceInformation.model

This package contains the model definitions for the Change Device Information operation.

# Package ch.nevis.exampleapp.ui.credential

This package contains the view and view model definitions for credential related operations, like change, enroll or verify a PIN or password.

# Package ch.nevis.exampleapp.ui.credential.model

This package contains the model definitions for credential related operations.

# Package ch.nevis.exampleapp.ui.credential.parameter

This package contains the navigation parameter definitions for credential related operations.

# Package ch.nevis.exampleapp.ui.error

This package contains the view definition for error handling.

# Package ch.nevis.exampleapp.ui.error.parameter

This package contains the navigation parameter definitions for error handling.

# Package ch.nevis.exampleapp.ui.home

This package contains the view and view model definitions for the Home feature.

# Package ch.nevis.exampleapp.ui.home.model

This package contains the model definitions for the Home feature.

# Package ch.nevis.exampleapp.ui.main

This package contains the main activity and view model definitions.

# Package ch.nevis.exampleapp.ui.navigation

This package contains the navigation implementation.

# Package ch.nevis.exampleapp.ui.outOfBand

This package contains the base view model definition for Out-of-Band operations.

# Package ch.nevis.exampleapp.ui.qrReader

This package contains the view and view model definitions for Qr Code reading.

# Package ch.nevis.exampleapp.ui.result

This package contains the view definition for displaying operation result.

# Package ch.nevis.exampleapp.ui.result.parameter

This package contains the navigation parameter definitions for displaying operation result.

# Package ch.nevis.exampleapp.ui.selectAccount

This package contains the view and view model definitions for account selection.

# Package ch.nevis.exampleapp.ui.selectAccount.parameter

This package contains the navigation parameter definitions for account selection.

# Package ch.nevis.exampleapp.ui.selectAuthenticator

This package contains the view and view model definitions for authenticator selection.

# Package ch.nevis.exampleapp.ui.selectAuthenticator.model

This package contains the model definitions for authenticator selection.

# Package ch.nevis.exampleapp.ui.selectAuthenticator.parameter

This package contains the navigation parameter definitions for authenticator selection.

# Package ch.nevis.exampleapp.ui.transactionConfirmation

This package contains the view and view model definitions for transaction confirmation.

# Package ch.nevis.exampleapp.ui.transactionConfirmation.model

This package contains the model definitions for transaction confirmation.

# Package ch.nevis.exampleapp.ui.transactionConfirmation.parameter

This package contains the navigation parameter definitions for transaction confirmation.

# Package ch.nevis.exampleapp.ui.userNamePasswordLogin

This package contains the view and view model definitions for In-Band Registration operation.

# Package ch.nevis.exampleapp.ui.util

This package contains utility methods.

# Package ch.nevis.exampleapp.ui.verifyUser

This package contains the view and view model definitions for user verification.

# Package ch.nevis.exampleapp.ui.verifyUser.model

This package contains the model definitions for user verification.

# Package ch.nevis.exampleapp.ui.verifyUser.parameter

This package contains the navigation parameter definitions for user verification.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class ExampleApplication : Application() {
lateinit var sdkLogger: SdkLogger

//region Application
/** @suppress */
override fun onCreate() {
super.onCreate()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ import timber.log.Timber

/**
* Implementation of [ErrorHandler] interface for cases the user cancels an operation.
*
* @constructor Creates a new instance.
* @param navigationDispatcher An instance of a [NavigationDispatcher] interface implementation.
*/
class CancelErrorHandlerImpl(
/**
* An instance of a [NavigationDispatcher] interface implementation.
*/
private val navigationDispatcher: NavigationDispatcher
) : ErrorHandler {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ package ch.nevis.exampleapp.common.error
/**
* Main implementation of the [ErrorHandler] interface that can delegate the handling of the errors to
* other configured [ErrorHandler] instances.
*
* @constructor Creates a new instance.
* @param errorHandlerChain A [List] of [ErrorHandler] instances those can handle or bypass the given
* error when [ErrorHandler.handle] is called. If the error is handled by an
* [ErrorHandler], the error processing will be ended, the error will not be delegated to further
* elements of the chain.
*/
class ChainErrorHandlerImpl(

/**
* A [List] of [ErrorHandler] instances those can handle or bypass the given error when
* [ErrorHandler.handle] is called. If the error is handled by an [ErrorHandler], the error
* processing will be ended, the error will not be delegated to further elements of the chain.
*/
private val errorHandlerChain: List<ErrorHandler>
) : ErrorHandler {

Expand All @@ -31,4 +31,4 @@ class ChainErrorHandlerImpl(
return true
}
//endregion
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,13 @@ import timber.log.Timber

/**
* Default implementation of [ErrorHandler] interface.
*
* @constructor Creates a new instance.
* @param context An Android [Context] object for [String] resource resolving.
* @param navigationDispatcher An instance of a [NavigationDispatcher] interface implementation.
*/
class DefaultErrorHandlerImpl(
/**
* An Android [Context] object for [String] resource resolving.
*/
private val context: Context,

/**
* An instance of a [NavigationDispatcher] interface implementation.
*/
private val navigationDispatcher: NavigationDispatcher
) : ErrorHandler {

Expand Down Expand Up @@ -73,4 +70,4 @@ class DefaultErrorHandlerImpl(
return throwable.message ?: throwable.stackTraceToString()
}
//endregion
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ interface Settings {
* by requiring user authentication.
* However in some cases it may be acceptable for the sake of end-user convenience. Allowing Class 2
* sensors will enable for instance the use of face recognition in some Samsung devices.
*
* @see ch.nevis.mobile.sdk.api.operation.authcloudapi.AuthCloudApiRegistration
* @see ch.nevis.mobile.sdk.api.operation.outofband.OutOfBandRegistration
* @see ch.nevis.mobile.sdk.api.operation.Registration.allowClass2Sensors
*/
val allowClass2Sensors: Boolean
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import javax.inject.Inject

/**
* Default implementation of [Settings] interface.
*
* @constructor Creates a new instance.
* @param context The Android [Context].
*/
class SettingsImpl @Inject constructor(
/**
* The Android [Context].
*/
@ApplicationContext
private val context: Context
) : Settings {
Expand Down
Loading

0 comments on commit 6276be6

Please sign in to comment.