What are Keycloak's OAuth2 / OpenID Connect endpoints?

前端 未结 9 2040
孤独总比滥情好
孤独总比滥情好 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:23

    For Keycloak 1.2 the above information can be retrieved via the url

    http://keycloakhost:keycloakport/auth/realms/{realm}/.well-known/openid-configuration

    For example, if the realm name is demo:

    http://keycloakhost:keycloakport/auth/realms/demo/.well-known/openid-configuration

    An example output from above url:

    {
        "issuer": "http://localhost:8080/auth/realms/demo",
        "authorization_endpoint": "http://localhost:8080/auth/realms/demo/protocol/openid-connect/auth",
        "token_endpoint": "http://localhost:8080/auth/realms/demo/protocol/openid-connect/token",
        "userinfo_endpoint": "http://localhost:8080/auth/realms/demo/protocol/openid-connect/userinfo",
        "end_session_endpoint": "http://localhost:8080/auth/realms/demo/protocol/openid-connect/logout",
        "jwks_uri": "http://localhost:8080/auth/realms/demo/protocol/openid-connect/certs",
        "grant_types_supported": [
            "authorization_code",
            "refresh_token",
            "password"
        ],
        "response_types_supported": [
            "code"
        ],
        "subject_types_supported": [
            "public"
        ],
        "id_token_signing_alg_values_supported": [
            "RS256"
        ],
        "response_modes_supported": [
            "query"
        ]
    }
    

    Found information at https://issues.jboss.org/browse/KEYCLOAK-571

    Note: You might need to add your client to the Valid Redirect URI list

提交回复
热议问题