-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replaced callbacks onTokenExpiring and onTokenExpired by event types …
…OidcTokenExpiringEvent/OidcTokenExpiredEvent
- Loading branch information
Showing
4 changed files
with
44 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
packages/oidc_core/lib/src/models/events/token_expired_event.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import 'package:oidc_core/oidc_core.dart'; | ||
|
||
/// An event that gets raised after a token expired. | ||
class OidcTokenExpiredEvent extends OidcEvent { | ||
/// | ||
const OidcTokenExpiredEvent({ | ||
required this.currentToken, | ||
required super.at, | ||
}); | ||
|
||
/// | ||
OidcTokenExpiredEvent.now({ | ||
required this.currentToken, | ||
}) : super.now(); | ||
|
||
/// The current token that is expired. | ||
final OidcToken currentToken; | ||
} |
18 changes: 18 additions & 0 deletions
18
packages/oidc_core/lib/src/models/events/token_expiring_event.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import 'package:oidc_core/oidc_core.dart'; | ||
|
||
/// An event that gets raised before a token expires. | ||
class OidcTokenExpiringEvent extends OidcEvent { | ||
/// | ||
const OidcTokenExpiringEvent({ | ||
required this.currentToken, | ||
required super.at, | ||
}); | ||
|
||
/// | ||
OidcTokenExpiringEvent.now({ | ||
required this.currentToken, | ||
}) : super.now(); | ||
|
||
/// The current token that is expiring. | ||
final OidcToken currentToken; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters