| | | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | | 2 | | // Licensed under the MIT License. |
| | | 3 | | |
| | | 4 | | using Microsoft.Identity.Client; |
| | | 5 | | |
| | | 6 | | namespace Azure.Identity |
| | | 7 | | { internal class AuthenticationAccount : IAccount |
| | | 8 | | { |
| | | 9 | | private AuthenticationRecord _profile; |
| | | 10 | | |
| | 16 | 11 | | internal AuthenticationAccount(AuthenticationRecord profile) |
| | | 12 | | { |
| | 16 | 13 | | _profile = profile; |
| | 16 | 14 | | } |
| | | 15 | | |
| | 16 | 16 | | string IAccount.Username => _profile.Username; |
| | | 17 | | |
| | 4 | 18 | | string IAccount.Environment => _profile.Authority; |
| | | 19 | | |
| | 40 | 20 | | AccountId IAccount.HomeAccountId => _profile.AccountId; |
| | | 21 | | |
| | 12 | 22 | | public static explicit operator AuthenticationAccount(AuthenticationRecord profile) => new AuthenticationAccount |
| | 0 | 23 | | public static explicit operator AuthenticationRecord(AuthenticationAccount account) => account._profile; |
| | | 24 | | } |
| | | 25 | | } |