Skip to content

Commit 8539a90

Browse files
author
Crhistian
committed
Fix incorrect model type on DecodedToken.role #76
1 parent 10d17fd commit 8539a90

3 files changed

Lines changed: 9 additions & 13 deletions

File tree

codegen/templates/models/DecodedToken.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { SecurityProfile } from './SecurityProfile'
2-
31
export interface DecodedToken {
42
/**
53
* the ordercloud username
@@ -19,10 +17,10 @@ export interface DecodedToken {
1917

2018
/**
2119
* list of security profile roles that this user
22-
* has access to, read more about security profile roles
23-
* [here](https://developer.ordercloud.io/documentation/platform-guides/authentication/security-profiles)
20+
* has access to. This may include OrderCloud roles or custom roles. read more about security profile roles
21+
* [here](https://ordercloud.io/knowledge-base/security-profiles)
2422
*/
25-
role: Array<SecurityProfile['Roles']> | SecurityProfile['Roles']
23+
role: string[] | string // if only one role exists then it is encoded as a string
2624

2725
/**
2826
* the issuer of the token - should always be https://auth.ordercloud.io

docs/interfaces/decodedtoken.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,14 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> orderid</h3>
145145
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
146146
<a name="role" class="tsd-anchor"></a>
147147
<h3>role</h3>
148-
<div class="tsd-signature tsd-kind-icon">role<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Array</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">SecurityProfile[&quot;Roles&quot;]</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">SecurityProfile[&quot;Roles&quot;]</span></div>
148+
<div class="tsd-signature tsd-kind-icon">role<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></div>
149149
<aside class="tsd-sources">
150150
</aside>
151151
<div class="tsd-comment tsd-typography">
152152
<div class="lead">
153153
<p>list of security profile roles that this user
154-
has access to, read more about security profile roles
155-
<a href="https://developer.ordercloud.io/documentation/platform-guides/authentication/security-profiles">here</a></p>
154+
has access to. This may include OrderCloud roles or custom roles. read more about security profile roles
155+
<a href="https://ordercloud.io/knowledge-base/security-profiles">here</a></p>
156156
</div>
157157
</div>
158158
</section>

src/models/DecodedToken.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { SecurityProfile } from './SecurityProfile'
2-
31
export interface DecodedToken {
42
/**
53
* the ordercloud username
@@ -19,10 +17,10 @@ export interface DecodedToken {
1917

2018
/**
2119
* list of security profile roles that this user
22-
* has access to, read more about security profile roles
23-
* [here](https://developer.ordercloud.io/documentation/platform-guides/authentication/security-profiles)
20+
* has access to. This may include OrderCloud roles or custom roles. read more about security profile roles
21+
* [here](https://ordercloud.io/knowledge-base/security-profiles)
2422
*/
25-
role: Array<SecurityProfile['Roles']> | SecurityProfile['Roles']
23+
role: string[] | string // if only one role exists then it is encoded as a string
2624

2725
/**
2826
* the issuer of the token - should always be https://auth.ordercloud.io

0 commit comments

Comments
 (0)