Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
key: 'data.errors',
},
}),
NbOAuth2AuthStrategy.setup({
name: 'password',
clientId: 'test',
clientSecret: 'secret',
baseEndpoint: 'http://localhost:4400/api/auth/',
token: {
endpoint: 'token',
grantType: NbOAuth2GrantType.PASSWORD,
class: NbAuthOAuth2Token,
},
refresh: {
endpoint: 'refresh-token',
grantType: NbOAuth2GrantType.REFRESH_TOKEN,
},
}),
],
}),
NbSecurityModule.forRoot({
accessControl: {
guest: {
view: ['news', 'comments'],
},
user: {
parent: 'guest',
create: 'comments',
},
moderator: {
parent: 'user',
create: 'news',
key: 'data.errors',
},
}),
NbOAuth2AuthStrategy.setup({
name: 'password',
clientId: 'test',
clientSecret: 'secret',
baseEndpoint: 'http://localhost:4400/api/auth/',
token: {
endpoint: 'token',
grantType: NbOAuth2GrantType.PASSWORD,
class: NbAuthOAuth2Token,
},
refresh: {
endpoint: 'refresh-token',
grantType: NbOAuth2GrantType.REFRESH_TOKEN,
},
}),
],
}),
NbSecurityModule.forRoot({
accessControl: {
guest: {
view: ['news', 'comments'],
},
user: {
parent: 'guest',
create: 'comments',
},
moderator: {
parent: 'user',
create: 'news',