Skip to content

Commit cc59f26

Browse files
committed
[doc] example of agent code usage
1 parent 0c1d4e4 commit cc59f26

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
lines changed

apps/boruta_admin/assets/src/models/client.model.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ import { addClientErrorInterceptor } from './utils'
55

66
const allGrantTypes = [
77
'client_credentials',
8+
'agent_credentials',
89
'password',
910
'authorization_code',
11+
'agent_code',
1012
'refresh_token',
1113
'implicit',
1214
'preauthorized_code',

apps/boruta_identity/assets/wallet/src/components/Credentials.vue

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,19 @@
3030
</div>
3131
</div>
3232
</div>
33+
<form class="ui form card">
34+
<div class="content">
35+
<div class="header">
36+
Share content
37+
</div>
38+
<div class="description">
39+
<textarea placeholder="content" v-model="shareContent"></textarea>
40+
</div>
41+
</div>
42+
<div class="extra content">
43+
<a :href="shareUrl" class="ui basic fluid blue button">Share credential offer</a>
44+
</div>
45+
</form>
3346
</div>
3447
</div>
3548
<div class="modal-wrapper" v-if="credential">
@@ -64,7 +77,9 @@ export default defineComponent({
6477
data () {
6578
return {
6679
formattedCredentials: [],
67-
credential: null
80+
shareContent: null,
81+
credential: null,
82+
shareUrl: window.env.BORUTA_OAUTH_BASE_URL + `/oauth/authorize?client_id=00000000-0000-0000-0000-000000000001&redirect_uri=http://localhost:4000/accounts/wallet/agent-code&response_type=code`
6883
}
6984
},
7085
methods: {
@@ -74,6 +89,11 @@ export default defineComponent({
7489
hideCredential (credential) {
7590
this.credential = null
7691
}
92+
},
93+
watch: {
94+
shareContent (value) {
95+
localStorage.setItem('shareContent', value)
96+
}
7797
}
7898
})
7999
</script>

apps/boruta_identity/assets/wallet/src/router/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
2+
23
import HomeView from '../views/HomeView.vue'
34
import Siopv2View from '../views/Siopv2View.vue'
45
import VerifiableCredentialsIssuanceView from '../views/VerifiableCredentialsIssuanceView.vue'
56
import VerifiablePresentationsView from '../views/VerifiablePresentationsView.vue'
7+
import AgentCodeView from '../views/AgentCodeView.vue'
68

79
const routes: Array<RouteRecordRaw> = [
810
{
@@ -25,6 +27,11 @@ const routes: Array<RouteRecordRaw> = [
2527
name: 'verifiable-presentation',
2628
component: VerifiablePresentationsView
2729
},
30+
{
31+
path: '/agent-code',
32+
name: 'agent-code',
33+
component: AgentCodeView
34+
},
2835
{
2936
path: '/callback',
3037
name: 'callback',

0 commit comments

Comments
 (0)