我正在使用Nebular和Django API。
我有以下身份验证策略设置
NbOAuth2AuthStrategy.setup({
name: 'oauth',
baseEndpoint: `${environment.apiURL}auth/`,
clientId: `${environment.clientId}`,
clientSecret: `${environment.clientSecret}`,
clientAuthMethod: NbOAuth2ClientAuthMethod.BASIC,
redirect: {
success: '/',
failure: null,
},
token: {
endpoint: 'token/',
grantType: NbOAuth2GrantType.PASSWORD,
class: NbAuthOAuth2Token,
},
}),
端点应该接受client_id
并且client_secret
为了登录。
邮递员有效载荷是
但是星云请求有以下数据
body: "grant_type=password&username=test%40example.com&password=test1234"
headers: HttpHeaders {normalizedNames: Map(2), lazyUpdate: null, headers: Map(2), lazyInit: null}
method: "POST"
params: HttpParams {updates: null, cloneFrom: null, encoder: HttpUrlEncodingCodec, map: Map(0)}
reportProgress: false
responseType: "json"
尸体不见了client_id
,而且client_secret
。如何添加client_id
and client_secret
?