public override async Task InitializeAsync() { await base.InitializeAsync(); var resp = await client.GetAsync("/a/app/login/Salt"); resp.EnsureSuccessStatusCode(); identity = JsonConvert.DeserializeObject <RemoteIdentity>(await resp.Content.ReadAsStringAsync()); Assert.Equal("/Food/Salt", identity.token.scope); Assert.Equal(username, identity.user.username); // authenticate a client on behalf of the application appClient = fx.getClient(); appClient.addBearerToken(identity.token); appClient.DefaultRequestHeaders.Add(Gatekeeper.Constants.APP_SECRET_HEADER, Constants.Apps.APP_SECRET); }
public void SetRemoteIdentity(RemoteIdentity identity) { remoteIdentity = identity; }
public void SetUp() { mSut = new RemoteIdentity(new ReadOnlyCollection <IProperty>(new List <IProperty>())); }
public void SetUp() { mSut = new RemoteIdentity(); }