-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
78 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,49 +34,53 @@ object AuditorRestAPI { | |
var auditorApi: Javalin? = null | ||
|
||
fun start(port: Int = AUDITOR_API_PORT, bindAddress: String = BIND_ADDRESS, apiTargetUrls: List<String> = listOf()) { | ||
|
||
auditorApi = Javalin.create { | ||
|
||
it.apply { | ||
registerPlugin(RouteOverviewPlugin("/api-routes")) | ||
|
||
registerPlugin(OpenApiPlugin(OpenApiOptions(InitialConfigurationCreator { | ||
OpenAPI().apply { | ||
info { | ||
title = "walt.id Auditor API" | ||
description = "The walt.id public API documentation" | ||
contact = Contact().apply { | ||
name = "walt.id" | ||
url = "https://walt.id" | ||
email = "[email protected]" | ||
} | ||
version = Values.version | ||
} | ||
servers = listOf( | ||
Server().url("/"), | ||
*apiTargetUrls.map { Server().url(it) }.toTypedArray() | ||
) | ||
externalDocs { | ||
description = "walt.id Docs" | ||
url = "https://docs.walt.id" | ||
} | ||
registerPlugin( | ||
OpenApiPlugin( | ||
OpenApiOptions( | ||
InitialConfigurationCreator { | ||
OpenAPI().apply { | ||
info { | ||
title = "walt.id Auditor API" | ||
description = "The walt.id public API documentation" | ||
contact = Contact().apply { | ||
name = "walt.id" | ||
url = "https://walt.id" | ||
email = "[email protected]" | ||
} | ||
version = Values.version | ||
} | ||
servers = listOf( | ||
Server().url("/"), | ||
*apiTargetUrls.map { Server().url(it) }.toTypedArray() | ||
) | ||
externalDocs { | ||
description = "walt.id Docs" | ||
url = "https://docs.walt.id" | ||
} | ||
|
||
components { | ||
securityScheme { | ||
name = "bearerAuth" | ||
type = SecurityScheme.Type.HTTP | ||
scheme = "bearer" | ||
`in` = SecurityScheme.In.HEADER | ||
description = "HTTP Bearer Token authentication" | ||
bearerFormat = "JWT" | ||
components { | ||
securityScheme { | ||
name = "bearerAuth" | ||
type = SecurityScheme.Type.HTTP | ||
scheme = "bearer" | ||
`in` = SecurityScheme.In.HEADER | ||
description = "HTTP Bearer Token authentication" | ||
bearerFormat = "JWT" | ||
} | ||
} | ||
} | ||
} | ||
).apply { | ||
path("/v1/api-documentation") | ||
swagger(SwaggerOptions("/v1/swagger").title("walt.id Auditor API")) | ||
reDoc(ReDocOptions("/v1/redoc").title("walt.id Auditor API")) | ||
} | ||
} | ||
}).apply { | ||
path("/v1/api-documentation") | ||
swagger(SwaggerOptions("/v1/swagger").title("walt.id Auditor API")) | ||
reDoc(ReDocOptions("/v1/redoc").title("walt.id Auditor API")) | ||
})) | ||
) | ||
) | ||
} | ||
|
||
it.enableCorsForAllOrigins() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
src/main/kotlin/id/walt/credentials/w3c/templates/VcTemplateManager.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters