Commit 9b59471
committed
Fix broken OAUTH2.0 authorization_code flow.
When configuring an Oauth2.0 provider that returns opaque access tokens, the UAA throws an error trying to parse it as it assumes it is a JWT id_token
Easy to reproduce by adding Github as an OAuth provider in uaa.yml
login:
oauth:
providers:
github:
type: oauth2.0
authUrl: https://github.com/login/oauth/authorize
tokenUrl: https://github.com/login/oauth/access_token
userInfoUrl: https://api.github.com/user
issuer: https://github.com
relyingPartyId: <your-github-app-client-id>
relyingPartySecret: <your-github-app-client-secret>
performRpInitiatedLogout: false
scopes:
- openid
linkText: Login with Github
showLinkText: true
attributeMappings:
user_name: login
clientAuthInBody: true
externalGroupsWhitelist:
- "*"1 parent 7e671a0 commit 9b59471
File tree
2 files changed
+55
-3
lines changed- server/src
- main/java/org/cloudfoundry/identity/uaa/provider/oauth
- test/java/org/cloudfoundry/identity/uaa/provider/oauth
2 files changed
+55
-3
lines changedLines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
| |||
609 | 610 | | |
610 | 611 | | |
611 | 612 | | |
612 | | - | |
613 | | - | |
614 | | - | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
615 | 621 | | |
616 | 622 | | |
617 | 623 | | |
| |||
Lines changed: 46 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
| 88 | + | |
86 | 89 | | |
87 | 90 | | |
88 | 91 | | |
| |||
1083 | 1086 | | |
1084 | 1087 | | |
1085 | 1088 | | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
1086 | 1132 | | |
1087 | 1133 | | |
1088 | 1134 | | |
| |||
0 commit comments