Git Product home page Git Product logo

Comments (3)

msalafia avatar msalafia commented on May 23, 2024

Hi @NObodyGX, the problem is due to a missing Authorization: Bearer {{token}} in the HTTP Request.

If you read the API Documentation you will find that all the /api/* endpoint requires authorization token which is obtained making a POST request to the http://{{base_url}}/auth/authenticate endpoint and passing username and password as parameter. If you are using the StubAuthenticator you can use "Admin" and "password" as username and password, respectively.

Anyway you have noticed a bug in our RefreshTokenMiddleware, so i want to thank you. I have created a branch with the bugfix named issue-7. You can pull this bugfix and try again: you should obtain a "401 Unauthorized" response if you don't provide a valid Authorization header.

Please refer to the pull request #8 and let me know if the issue has been solved.

from opcuawebplatformunict.

NObodyGX avatar NObodyGX commented on May 23, 2024

@msalafia
I debuge that authorization get it value by
authorization = (String.IsNullOrEmpty(authorization)) ? "Bearer " : authorization;
and web page get HTTP ERROR 404 finally.
Should I add authorization head manually or something else?
Thanks a lot for your help.

from opcuawebplatformunict.

msalafia avatar msalafia commented on May 23, 2024

Wait a moment, the response should return "401 UNAUTHORIZED" not 404. Try to test the platform using a tool like Postman according to the API Documentation. This is a pretty good way to test a Web API. Hope this could help you.

from opcuawebplatformunict.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.