TF-571 Use response from webfinger to get OIDC from authority

This commit is contained in:
Dat PHAM HOANG
2022-05-27 11:34:53 +07:00
committed by Dat H. Pham
parent ea598c20b8
commit a48cd35d4f
14 changed files with 84 additions and 50 deletions
-8
View File
@@ -16,14 +16,6 @@ class OIDCConfiguration with EquatableMixin {
required this.scopes
});
factory OIDCConfiguration.initial() {
return OIDCConfiguration(
authority: 'https://auth.upn.integration-open-paas.org/auth/realms/mobile',
clientId: 'teammail-mobile',
scopes: ['openid', 'offline_access']
);
}
String get discoveryUrl {
if (authority.endsWith('/')) {
return authority + wellKnownOpenId;
+3 -3
View File
@@ -4,10 +4,10 @@ import 'package:equatable/equatable.dart';
class OIDCRequest with EquatableMixin {
final String baseUrl;
final String resourceUrl = 'https://gateway.upn.integration-open-paas.org';
final String relUrl = 'http://openid.net/specs/connect/1.0/issuer';
final String resourceUrl;
static const String relUrl = 'http://openid.net/specs/connect/1.0/issuer';
OIDCRequest({required this.baseUrl});
OIDCRequest({required this.baseUrl, required this.resourceUrl});
@override
List<Object?> get props => [baseUrl, resourceUrl, relUrl];