private void ReceiveAuthenticationCode(AuthenticationTokenReceiveContext context) { string value; if (_authenticationCodes.TryRemove(context.Token, out value)) { context.DeserializeTicket(value); } }
public virtual void Receive(AuthenticationTokenReceiveContext context) { if (OnReceiveAsync != null && OnReceive == null) { throw new InvalidOperationException("Authentication token did not provide an OnReceive method."); } if (OnReceive != null) { OnReceive.Invoke(context); } }
public virtual async Task ReceiveAsync(AuthenticationTokenReceiveContext context) { if (OnReceiveAsync != null && OnReceive == null) { throw new InvalidOperationException("Authentication token did not provide an OnReceive method."); } if (OnReceiveAsync != null) { await OnReceiveAsync.Invoke(context); } else { Receive(context); } }
private void ReceiveRefreshToken(AuthenticationTokenReceiveContext context) { context.DeserializeTicket(context.Token); }