All Projects → ximedes → ktor-authorization

ximedes / ktor-authorization

Licence: Apache-2.0 License
A working example of implementing role-based authorization in Ktor

Programming Languages

kotlin
9241 projects
FreeMarker
481 projects
CSS
56736 projects

Role-based authorization in Ktor

This repository contains a demo application showing a possible way to implement role-based authorization of routes in Ktor.

More information on its design can be found in this accompanying blog post.

Running from IntelliJ IDEA

Run the main method on line 16 in Application.kt

Running from maven

Compile and package the JAR file and run it:

mvn package
cd target
java -jar ktor-authorization-0.0.1-SNAPSHOT-jar-with-dependencies.jar

In either case, the application should be accessible at http://localhost:8080

When asked to log in, any username will do. The password is always secret.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].