对接统一登录认证
This commit is contained in:
28
ca-admin-ui/src/views/login/social/index.vue
Normal file
28
ca-admin-ui/src/views/login/social/index.vue
Normal file
@@ -0,0 +1,28 @@
|
||||
<script>
|
||||
import { buildAuthorizeUrl } from '@/utils/oauth-utils'
|
||||
|
||||
export default {
|
||||
mounted() {
|
||||
this.handleAuthorize()
|
||||
},
|
||||
methods: {
|
||||
handleAuthorize() {
|
||||
const authUrl = buildAuthorizeUrl(
|
||||
'http://127.0.0.1:8080',
|
||||
'certificate-authority-client',
|
||||
'http://127.0.0.1:9529/callback',
|
||||
'',
|
||||
'openid profile certificate.read certificate.write'
|
||||
)
|
||||
console.log(authUrl)
|
||||
debugger
|
||||
// 跳转授权页面(可选)
|
||||
window.location.href = authUrl
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user