What are Keycloak's OAuth2 / OpenID Connect endpoints?

前端 未结 9 2036
孤独总比滥情好
孤独总比滥情好 2020-12-12 10:42

We are trying to evaluate Keycloak as an SSO solution, and it looks good in many respects, but the documentation is painfully lacking in the basics.

For a given Keyc

9条回答
  •  再見小時候
    2020-12-12 11:27

    After much digging around we were able to scrape the info more or less (mainly from Keycloak's own JS client lib):

    • Authorization Endpoint: /auth/realms/{realm}/tokens/login
    • Token Endpoint: /auth/realms/{realm}/tokens/access/codes

    As for OpenID Connect UserInfo, right now (1.1.0.Final) Keycloak doesn't implement this endpoint, so it is not fully OpenID Connect compliant. However, there is already a patch that adds that as of this writing should be included in 1.2.x.

    But - Ironically Keycloak does send back an id_token in together with the access token. Both the id_token and the access_token are signed JWTs, and the keys of the token are OpenID Connect's keys, i.e:

    "iss":  "{realm}"
    "sub":  "5bf30443-0cf7-4d31-b204-efd11a432659"
    "name": "Amir Abiri"
    "email: "..."
    

    So while Keycloak 1.1.x is not fully OpenID Connect compliant, it does "speak" in OpenID Connect language.

提交回复
热议问题