Closed vanrin closed 6 years ago
I think you should be able to achieve what you want with the ajax option. Something like:
var table = $('table#sample').DataTable({
ajax: {
beforeSend: (xhr) => xhr.setRequestHeader('Authorization', 'Bearer <token>')
}
}
thanks
How to request resource from Oauth2 resource server? I have tried
ajax: '/api/errorlog/all',
serverSide: true,
processing: true,
And give following error{error: "unauthorized", error_description: "Full authentication is required to access this resource"} error : "unauthorized" error_description : "Full authentication is required to access this resource"
Note : I use spring boot with thymeleaf and try to request after authenticated.