Giter Site home page Giter Site logo

How to use? about kotlin-oauth2-server HOT 6 CLOSED

myndocs avatar myndocs commented on July 28, 2024
How to use?

from kotlin-oauth2-server.

Comments (6)

adhesivee avatar adhesivee commented on July 28, 2024 1

@sergiocasero I tested it with postman. Postman seems to be the problem here. That empty page what you see is the part where you normally login with basic authentication (/oauth/authorize).
It seems you can not use basic auth for authorization endpoints in postman.
With the coming release form logins could be supported. I need to create examples for this too. I will create an issue (#67).

I am not sure what you mean with: I always put the routings inside authentication { } block, but it seems to be not working with the lib
Could you please open a new issue and give some examples what you mean?

from kotlin-oauth2-server.

adhesivee avatar adhesivee commented on July 28, 2024

I have to update documentation about this. The default links can be found here https://github.com/myndocs/kotlin-oauth2-server/blob/develop/oauth2-server-core/src/main/java/nl/myndocs/oauth2/config/CallRouterBuilder.kt#L9-L11

from kotlin-oauth2-server.

sergiocasero avatar sergiocasero commented on July 28, 2024

Hello! I'm also a little bit confused. I've configured everything on the app but I don't know how to use it.

When I try to get the token with postman (for example) I just get an empty page, could you please add a "full" sample about how to use it for noobs?

from kotlin-oauth2-server.

adhesivee avatar adhesivee commented on July 28, 2024

@sergiocasero I think there is quite some information available how to use oauth
Maybe I can include some basic example but I dont know in which format yet

If you POST to token endpoint I think it should always respond with something. This might be a bug, did you see an exceptions showing up in the log?

from kotlin-oauth2-server.

sergiocasero avatar sergiocasero commented on July 28, 2024

Hello, the logs don't say anything (using ktor)

this is my configuration:

install(Oauth2ServerFeature) {
        identityService = InMemoryIdentity()
            .identity {
                username = "test"
                password = "test"
            }

        clientService = InMemoryClient()
            .client {
                clientId = "test"
                clientSecret = "test"
                scopes = setOf("test")
                redirectUris = setOf("http://localhost:8080/callback")
                authorizedGrantTypes = setOf(AuthorizedGrantType.AUTHORIZATION_CODE)
            }

        tokenStore = InMemoryTokenStore()
    }

And this is the postman config:
imagen

And postman says...
imagen

Also, I don't how to encapsulate my requests into the "auth" section. When I use the ktor auth module, I always put the routings inside authentication { } block, but it seems to be not working with the lib-

from kotlin-oauth2-server.

sergiocasero avatar sergiocasero commented on July 28, 2024

Yes... you was totally right, my bad sorry, the problem is POSTMAN, by making the requests manually looks like it works fine. Thanks for the awesome job! I'll open a new issue with the explanation of "encapsulating requests"

from kotlin-oauth2-server.

Related Issues (20)

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.