Skip to content

Commit

Permalink
Merge pull request #28 from daystram/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
daystram authored Jan 19, 2021
2 parents ac45c7c + 1cb448b commit ae17850
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 188 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ Ratify is a Central Authentication Service (CAS) implementing OAuth 2.0 and Open
- Authorization Code with PKCE
- _WIP: Client Credentials_

## Client Libraries
Use the following libraries to easily integrate your application with Ratify's authentication service.
- JavaScript: [ratify-client-js](https://github.com/daystram/ratify-client-js)

## Develop
Ratify is split into two sub-applications, `ratify-be` (backend) and `ratify-fe` (frontend). `ratify-fe` itself acts as stand-alone application to `ratify-be` and thus utilizes an access token it self-issued via the _Authorization Code with PKCE_ flow to authenticate users.

Expand Down Expand Up @@ -103,5 +107,4 @@ services:
## License
This project is licensed under the [MIT License](./LICENSE).
5 changes: 1 addition & 4 deletions ratify-fe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,11 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"@daystram/ratify-client": "^1.2.0",
"axios": "^0.21.1",
"core-js": "^3.6.5",
"jwt-decode": "^3.1.2",
"pkce-challenge": "^2.1.0",
"qrcode.vue": "^3.1.0",
"querystring": "^0.2.0",
"register-service-worker": "^1.7.1",
"uuid": "^8.3.2",
"vue": "^2.6.11",
"vue-class-component": "^7.2.3",
"vue-property-decorator": "^8.4.2",
Expand Down
2 changes: 1 addition & 1 deletion ratify-fe/src/apis/api.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios, { AxiosInstance, AxiosResponse } from "axios";
import { ACCESS_TOKEN } from "@daystram/ratify-client";
import { authManager, refreshAuth } from "@/auth";
import { ACCESS_TOKEN } from "@/auth/AuthManager";
import router from "@/router";

const apiClient: AxiosInstance = axios.create({
Expand Down
179 changes: 0 additions & 179 deletions ratify-fe/src/auth/AuthManager.ts

This file was deleted.

4 changes: 2 additions & 2 deletions ratify-fe/src/auth/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { ACCESS_TOKEN, RatifyClient } from "@daystram/ratify-client";
import router from "@/router";
import { AuthManager, ACCESS_TOKEN } from "@/auth/AuthManager";
import { Route } from "vue-router";

const CLIENT_ID = process.env.VUE_APP_CLIENT_ID;
const ISSUER = process.env.VUE_APP_OAUTH_ISSUER;
const REDIRECT_URI = `${location.origin}/callback`;

const authManager = new AuthManager({
const authManager = new RatifyClient({
clientId: CLIENT_ID,
redirectUri: REDIRECT_URI,
issuer: ISSUER,
Expand Down
18 changes: 17 additions & 1 deletion ratify-fe/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -846,6 +846,17 @@
lodash "^4.17.19"
to-fast-properties "^2.0.0"

"@daystram/ratify-client@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@daystram/ratify-client/-/ratify-client-1.2.0.tgz#46253c3e866d60c255055e00eb5193ef4ad4000c"
integrity sha512-DqeQbGJSaDPZQ9DfixEweebOLp4p7QktzSw4r/K69FKuYoWeWZbR8ZtgilpF2yeGZj9ultT+CdxAEJc7MO8CKA==
dependencies:
axios "^0.21.1"
jwt-decode "^3.1.2"
pkce-challenge "^2.1.0"
qs "^6.9.6"
uuid "^8.3.2"

"@hapi/[email protected]":
version "2.1.4"
resolved "https://registry.yarnpkg.com/@hapi/address/-/address-2.1.4.tgz#5d67ed43f3fd41a69d4b9ff7b56e7c0d1d0a81e5"
Expand Down Expand Up @@ -7041,6 +7052,11 @@ [email protected]:
resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc"
integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==

qs@^6.9.6:
version "6.9.6"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.6.tgz#26ed3c8243a431b2924aca84cc90471f35d5a0ee"
integrity sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ==

qs@~6.5.2:
version "6.5.2"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
Expand All @@ -7059,7 +7075,7 @@ querystring-es3@^0.2.0:
resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73"
integrity sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=

[email protected], querystring@^0.2.0:
[email protected]:
version "0.2.0"
resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620"
integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=
Expand Down

0 comments on commit ae17850

Please sign in to comment.