Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bostonaholic/ring-okta
Ring middleware for Okta Single Sign-on
https://github.com/bostonaholic/ring-okta
clojure middleware okta okta-saml-toolkit ring ring-middleware saml single-sign-on sso
Last synced: 3 months ago
JSON representation
Ring middleware for Okta Single Sign-on
- Host: GitHub
- URL: https://github.com/bostonaholic/ring-okta
- Owner: bostonaholic
- License: mit
- Created: 2016-05-23T16:35:08.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2024-10-01T00:32:37.000Z (4 months ago)
- Last Synced: 2024-10-21T20:47:54.904Z (3 months ago)
- Topics: clojure, middleware, okta, okta-saml-toolkit, ring, ring-middleware, saml, single-sign-on, sso
- Language: Clojure
- Homepage: https://bostonaholic.github.io/ring-okta/index.html
- Size: 416 KB
- Stars: 8
- Watchers: 4
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# ring-okta
[![Build and Test](https://github.com/bostonaholic/ring-okta/actions/workflows/build-and-test.yml/badge.svg?branch=main)](https://github.com/bostonaholic/ring-okta/actions/workflows/build-and-test.yml) [![Clojars Project](https://img.shields.io/clojars/v/bostonaholic/ring-okta.svg)](https://clojars.org/bostonaholic/ring-okta)
Ring middleware for Okta Single Sign-on.
## Installation
### Leiningen/Boot
```clojure
[bostonaholic/ring-okta "1.0.7"]
```### Clojure CLI/deps.edn
```clojure
bostonaholic/ring-okta {:mvn/version "1.0.7"}
```### Gradle
```gradle
implementation("bostonaholic:ring-okta:1.0.7")
```### Maven
```xml
bostonaholic
ring-okta
1.0.7```
### Okta SAML Toolkit Dependency
Since Okta doesn't publish the SAML Toolkit for Java, you must download it [here](https://support.okta.com/entries/25009573-Current-SAML-Toolkit-for-Java-Version). You then must `mvn install` it to your local maven repository. Check the [project.clj](./project.clj) for the version of the SAML Toolkit to download from Okta.
## Usage
```clojure
(ns com.company.core
(:require [compojure.core :refer :all]
[compojure.route :as route]
[ring.middleware.okta :refer [wrap-okta okta-routes]]))(defroutes company-routes
(GET "/" [] "Hello World
")okta-routes
(route/not-found "
Page not found
"))(def app
(-> company-routes
(wrap-okta "https://company.okta.com")))
```## Documentation
- [API Docs](http://bostonaholic.github.io/ring-okta/index.html)
The documentation is built with [codox](https://github.com/weavejester/codox) (`lein codox`) and published to `./docs` which ends up being hosted by GitHub Pages.
## Test Coverage
The test coverage summary is built with [cloverage](https://github.com/lshift/cloverage) (`lein cloverage`) and published to `./docs/coverage` and is hosted [here](https://bostonaholic.github.io/ring-okta/coverage/index.html).
## Development
As described in **Usage** above, the Okta SAML Toolkit must be downloaded and installed to your local maven repository. When updating this dependency, here is how you can install the downloaded jar:
```shell
mvn install:install-file -Dfile=saml-toolkit.jar -DgroupId=com.okta -DartifactId=saml-toolkit -Dpackaging=jar -Dversion= -DcreateChecksum=true -DupdateReleaseInfo=true -DgeneratePom=true -DlocalRepositoryPath=/path/to/localRepo
```## Releases
`ring-okta` is released on no particular schedule. New versions are released as needed when features are added or bugs are fixed.
Refer to the [CHANGELOG.md](./CHANGELOG.md) for all version releases and the included changes.
The process for releasing a new version is as follows:
### Pre-steps
1. Bump version in project.clj following [Semantic Versioning 2.0.0](https://semver.org/)
2. Bump version in [README.md](./README.md) to match `project.clj`
3. Add changes to [CHANGELOG.md](./CHANGELOG.md) following [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
4. Generate API docs with `lein codox`### Release
1. Commit changes with commit message `Release v`
2. Tag the commit with `git tag v`
3. Push changes to GitHub (including new tag with `--tags` option)
4. Deploy release to [Clojars](https://clojars.org) with `lein deploy clojars`### Post-steps
1. Bump patch version of `project.clj` to next `-SNAPSHOT`
2. Commit snapshot version with commit message ``## License
Copyright © 2024 Matthew Boston
Released under the MIT License.