Exemple #1
0
 /// <summary>
 /// Create a new session (sign in)
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='request'>
 /// Post session request
 /// </param>
 /// <param name='authorization'>
 /// Format is: "Scheme CredentialsList". Possible values are:
 ///
 /// - Anon AK=AppKey
 ///
 /// - SocialPlus TK=SessionToken
 ///
 /// - Facebook AK=AppKey|TK=AccessToken
 ///
 /// - Google AK=AppKey|TK=AccessToken
 ///
 /// - Twitter AK=AppKey|RT=RequestToken|TK=AccessToken
 ///
 /// - Microsoft AK=AppKey|TK=AccessToken
 ///
 /// - AADS2S AK=AppKey|[UH=UserHandle]|TK=AADToken
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <PostSessionResponse> PostSessionAsync(this ISessions operations, PostSessionRequest request, string authorization, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.PostSessionWithHttpMessagesAsync(request, authorization, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #2
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='session'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Session> PostSessionAsync(this ISessions operations, Session session, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.PostSessionWithHttpMessagesAsync(session, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }