TF-4145 Implement get oidc user_info from endpoint of oidc configuration

This commit is contained in:
dab246
2025-11-12 16:25:51 +07:00
committed by Dat H. Pham
parent 655a1bf81a
commit 43de7edd47
14 changed files with 185 additions and 6 deletions
@@ -5,7 +5,6 @@ part 'oidc_discovery_response.g.dart';
@JsonSerializable(explicitToJson: true, includeIfNull: false)
class OIDCDiscoveryResponse with EquatableMixin {
@JsonKey(name: 'authorization_endpoint')
final String? authorizationEndpoint;
@@ -15,12 +14,26 @@ class OIDCDiscoveryResponse with EquatableMixin {
@JsonKey(name: 'end_session_endpoint')
final String? endSessionEndpoint;
OIDCDiscoveryResponse(this.authorizationEndpoint, this.tokenEndpoint, this.endSessionEndpoint);
@JsonKey(name: 'userinfo_endpoint')
final String? userInfoEndpoint;
factory OIDCDiscoveryResponse.fromJson(Map<String, dynamic> json) => _$OIDCDiscoveryResponseFromJson(json);
OIDCDiscoveryResponse(
this.authorizationEndpoint,
this.tokenEndpoint,
this.endSessionEndpoint,
this.userInfoEndpoint,
);
factory OIDCDiscoveryResponse.fromJson(Map<String, dynamic> json) =>
_$OIDCDiscoveryResponseFromJson(json);
Map<String, dynamic> toJson() => _$OIDCDiscoveryResponseToJson(this);
@override
List<Object?> get props => [authorizationEndpoint, tokenEndpoint, endSessionEndpoint];
}
List<Object?> get props => [
authorizationEndpoint,
tokenEndpoint,
endSessionEndpoint,
userInfoEndpoint,
];
}