Skip to content

Commit

Permalink
Merge pull request #178 from mdaugs/feature-oidc_integration
Browse files Browse the repository at this point in the history
Feature OIDC integration
  • Loading branch information
ansibleguy76 authored Jun 7, 2024
2 parents 2567726 + ffcff25 commit 64051b1
Show file tree
Hide file tree
Showing 22 changed files with 4,275 additions and 2,111 deletions.
853 changes: 670 additions & 183 deletions client/package-lock.json

Large diffs are not rendered by default.

60 changes: 30 additions & 30 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,39 +12,39 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "~3.36.1",
"vue": "~2.7.15",
"@creativebulma/bulma-tooltip": "*",
"@femessage/log-viewer": "*",
"@fortawesome/fontawesome-svg-core": "~6.4.2",
"@fortawesome/free-brands-svg-icons": "~6.4.2",
"@fortawesome/free-regular-svg-icons": "~6.4.2",
"@fortawesome/free-solid-svg-icons": "~6.4.2",
"@fortawesome/vue-fontawesome": "2.0.10",
"axios": "~1.6.8",
"es6-promise": "~4.2.8",
"vuelidate": "~0.7.7",
"vue-router": "~3.5.4",
"vue-toastification" : "1.7.14",
"vue-json-pretty" : "1.8.3",
"copy-to-clipboard" : "~3.3.3",
"bulmaswatch": "0.8.1",
"bulma" : "0.9.4",
"bulma-quickview" : "*",
"@creativebulma/bulma-tooltip" : "*",
"lodash" : "~4.17.21",
"brace": "~0.11.1",
"bulma": "0.9.4",
"bulma-calendar": "6.1.19",
"bulma-checkradio": "~2.1.3",
"bulma-pageloader": "~0.3.0",
"brace": "~0.11.1",
"bulma-quickview": "*",
"bulmaswatch": "0.8.1",
"copy-to-clipboard": "~3.3.3",
"core-js": "~3.36.1",
"es6-promise": "~4.2.8",
"highlight.js": "9.11.0",
"vue-highlight.js": "3.1.0",
"vue-bulma-paginate" : "*",
"vue-moment" : "*",
"vue2-datepicker" : "~3.11.1",
"yaml": "1.10.2",
"jsonwebtoken": "^9.0.2",
"lodash": "~4.17.21",
"thenby": "*",
"vue": "~2.7.15",
"vue-bulma-paginate": "*",
"vue-highlight.js": "3.1.0",
"vue-json-pretty": "1.8.3",
"vue-moment": "*",
"vue-router": "~3.5.4",
"vue-showdown": "2.4.1",
"bulma-calendar": "6.1.19",
"@fortawesome/fontawesome-svg-core":"~6.4.2",
"@fortawesome/free-solid-svg-icons":"~6.4.2",
"@fortawesome/free-regular-svg-icons":"~6.4.2",
"@fortawesome/free-brands-svg-icons":"~6.4.2",
"@fortawesome/vue-fontawesome":"2.0.10",
"@femessage/log-viewer":"*"

"vue-toastification": "1.7.14",
"vue2-datepicker": "~3.11.1",
"vuelidate": "~0.7.7",
"yaml": "1.10.2"
},
"devDependencies": {
"@vue/cli": "~4.5.13",
Expand All @@ -54,10 +54,10 @@
"babel-eslint": "~10.1.0",
"eslint": "~6.8.0",
"eslint-plugin-vue": "~6.2.2",
"vue-template-compiler": "~2.6.11",
"nodemon": "~3.0.2",
"sass" :"~1.49.11",
"sass-loader":"10.1.1"
"sass": "~1.49.11",
"sass-loader": "10.1.1",
"vue-template-compiler": "~2.6.11"
},
"eslintConfig": {
"root": true,
Expand Down
156 changes: 156 additions & 0 deletions client/public/assets/img/openid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 13 additions & 5 deletions client/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,19 @@
}
},
logout() {
TokenStorage.clear()
this.formConfig=undefined
this.$router.replace({ name: "Login" }).catch(err => {});
this.refreshAuthenticated()
this.resetProfile()
TokenStorage.clear()
this.formConfig=undefined
this.refreshAuthenticated()
this.resetProfile()
axios.get(`${process.env.BASE_URL}api/v1/auth/logout`).then((res) => {
const logoutUrl = res.data?.data?.output?.logoutUrl
if (logoutUrl) {
location.replace(logoutUrl)
}
}).catch((err) => {
console.log(err)
this.$toast.error("Could not log out")
})
}
}
}
Expand Down
11 changes: 4 additions & 7 deletions client/src/components/BulmaNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@
<router-link class="navbar-item" to="/profile" v-if="authenticated && profile.type=='local' && profile.id">
<span class="icon"><font-awesome-icon icon="key" /></span><span>Change password</span>
</router-link>
<router-link class="navbar-item" to="/login" v-on:click.native="logout()" replace>
<a href="javascript:void" class="navbar-item" @click="$emit('logout')">
<span class="icon"><font-awesome-icon icon="sign-out-alt" /></span><span>Logout</span>
</router-link>
</a>
<a href="javascript:void" @click="$emit('profile')" class="navbar-item">
<span class="icon"><font-awesome-icon icon="address-card" /></span> <span>About me</span>
</a>
Expand Down Expand Up @@ -81,11 +81,8 @@
showNav: false,
baseUrl: "/"
}
},methods:{
logout(){
this.$emit("logout");
}
},mounted(){
},
mounted(){
this.baseUrl = process.env.BASE_URL
}
}
Expand Down
1 change: 1 addition & 0 deletions client/src/components/BulmaSettingsMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
{group:"authentication",title:"Users",to:"/users"},
{group:"authentication",title:"Ldap",to:"/ldap"},
{group:"authentication",title:"MS Entra ID",to:"/azuread"},
{group:"authentication",title:"Open ID Connect",to:"/oidc"},
{group:"connection",title:"Credentials",to:"/credentials"},
{group:"connection",title:"Ssh",to:"/sshkey"},
{group:"connection",title:"Known Hosts",to:"/knownhosts"},
Expand Down
9 changes: 8 additions & 1 deletion client/src/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import Repos from './views/Repos.vue'
import Users from './views/Users.vue'
import Ldap from './views/Ldap.vue'
import AzureAd from './views/AzureAd.vue'
import OIDC from './views/OIDC.vue'
import Settings from './views/Settings.vue'
import MailSettings from './views/MailSettings.vue'
import Awx from './views/Awx.vue'
Expand Down Expand Up @@ -144,7 +145,13 @@ export default new Router({
name:"AzureAd",
component:AzureAd,
beforeEnter: checkAdmin
},
},
{
path:"/oidc",
name:"OIDC",
component:OIDC,
beforeEnter: checkAdmin
},
{
path:"/settings",
name:"Settings",
Expand Down
Loading

0 comments on commit 64051b1

Please sign in to comment.