forked from Nexus/nexus
OAuth Support (#53)
Rips out the old auth method, adds OAuth support. Fixes #51. Tested Platforms: - [x] Linux - [x] Flatpak - [x] Native (Nix) - [x] Android - [ ] Windows - [ ] MacOS Reviewed-on: Nexus/nexus#53
This commit is contained in:
parent
5df975f607
commit
7d106ad3a2
86 changed files with 558 additions and 1344 deletions
17
lib/models/requests/oauth/exchange_token.dart
Normal file
17
lib/models/requests/oauth/exchange_token.dart
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import "package:freezed_annotation/freezed_annotation.dart";
|
||||
part "exchange_token.freezed.dart";
|
||||
part "exchange_token.g.dart";
|
||||
|
||||
@freezed
|
||||
abstract class OAuthExchangeTokenRequest with _$OAuthExchangeTokenRequest {
|
||||
const factory OAuthExchangeTokenRequest({
|
||||
required Uri homeserverUrl,
|
||||
required String codeVerifier,
|
||||
required Uri redirectUri,
|
||||
required String code,
|
||||
required String clientId,
|
||||
}) = _OAuthExchangeTokenRequest;
|
||||
|
||||
factory OAuthExchangeTokenRequest.fromJson(Map<String, Object?> json) =>
|
||||
_$OAuthExchangeTokenRequestFromJson(json);
|
||||
}
|
||||
Loading…
Reference in a new issue