Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

GoogleApiTokenInfo.cs 3.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. namespace Diligent.WebAPI.Contracts.Models
  2. {
  3. public class GoogleApiTokenInfo
  4. {
  5. /// <summary>
  6. /// The Issuer Identifier for the Issuer of the response. Always https://accounts.google.com or accounts.google.com for Google ID tokens.
  7. /// </summary>
  8. public string? iss { get; set; }
  9. /// <summary>
  10. /// Access token hash. Provides validation that the access token is tied to the identity token. If the ID token is issued with an access token in the server flow, this is always
  11. /// included. This can be used as an alternate mechanism to protect against cross-site request forgery attacks, but if you follow Step 1 and Step 3 it is not necessary to verify the
  12. /// access token.
  13. /// </summary>
  14. public string? at_hash { get; set; }
  15. /// <summary>
  16. /// Identifies the audience that this ID token is intended for. It must be one of the OAuth 2.0 client IDs of your application.
  17. /// </summary>
  18. public string? aud { get; set; }
  19. /// <summary>
  20. /// An identifier for the user, unique among all Google accounts and never reused. A Google account can have multiple emails at different points in time, but the sub value is never
  21. /// changed. Use sub within your application as the unique-identifier key for the user.
  22. /// </summary>
  23. public string? sub { get; set; }
  24. /// <summary>
  25. /// True if the user's e-mail address has been verified; otherwise false.
  26. /// </summary>
  27. public bool? email_verified { get; set; }
  28. /// <summary>
  29. /// The client_id of the authorized presenter. This claim is only needed when the party requesting the ID token is not the same as the audience of the ID token. This may be the
  30. /// case at Google for hybrid apps where a web application and Android app have a different client_id but share the same project.
  31. /// </summary>
  32. public string? azp { get; set; }
  33. /// <summary>
  34. /// The user's email address. This may not be unique and is not suitable for use as a primary key. Provided only if your scope included the string "email".
  35. /// </summary>
  36. public string? email { get; set; }
  37. /// <summary>
  38. /// The time the ID token was issued, represented in Unix time (integer seconds).
  39. /// </summary>
  40. public int? iat { get; set; }
  41. /// <summary>
  42. /// The time the ID token expires, represented in Unix time (integer seconds).
  43. /// </summary>
  44. public int? exp { get; set; }
  45. /// <summary>
  46. /// The user's full name, in a displayable form. Might be provided when:
  47. /// The request scope included the string "profile"
  48. /// The ID token is returned from a token refresh
  49. /// When name claims are present, you can use them to update your app's user records. Note that this claim is never guaranteed to be present.
  50. /// </summary>
  51. public string? name { get; set; }
  52. /// <summary>
  53. /// The URL of the user's profile picture. Might be provided when:
  54. /// The request scope included the string "profile"
  55. /// The ID token is returned from a token refresh
  56. /// When picture claims are present, you can use them to update your app's user records. Note that this claim is never guaranteed to be present.
  57. /// </summary>
  58. public string? picture { get; set; }
  59. public string? given_name { get; set; }
  60. public string? family_name { get; set; }
  61. public string? locale { get; set; }
  62. public string? alg { get; set; }
  63. public string? kid { get; set; }
  64. }
  65. }