200 lines
6.6 KiB
C#
200 lines
6.6 KiB
C#
using System;
|
|
using System.Runtime.CompilerServices;
|
|
using BestHTTP.SignalRCore.Messages;
|
|
using BestHTTP.WebSocket;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SignalRCore.Authentication
|
|
{
|
|
// Token: 0x020019D7 RID: 6615
|
|
[Token(Token = "0x20019D7")]
|
|
public sealed class DefaultAccessTokenAuthenticator : IAuthenticationProvider
|
|
{
|
|
// Token: 0x17001891 RID: 6289
|
|
// (get) Token: 0x06009A1E RID: 39454 RVA: 0x001F7BD4 File Offset: 0x001F5DD4
|
|
[Token(Token = "0x17001891")]
|
|
public bool IsPreAuthRequired
|
|
{
|
|
[Token(Token = "0x6009A1E")]
|
|
[Address(RVA = "0x424690", Offset = "0x423690", VA = "0x180424690", Slot = "4")]
|
|
get
|
|
{
|
|
}
|
|
}
|
|
|
|
// Token: 0x140000CA RID: 202
|
|
// (add) Token: 0x06009A1F RID: 39455 RVA: 0x001F7BE4 File Offset: 0x001F5DE4
|
|
// (remove) Token: 0x06009A20 RID: 39456 RVA: 0x001F7C0C File Offset: 0x001F5E0C
|
|
[Token(Token = "0x140000CA")]
|
|
public event OnAuthenticationSuccededDelegate OnAuthenticationSucceded
|
|
{
|
|
[Token(Token = "0x6009A1F")]
|
|
[Address(RVA = "0x627620", Offset = "0x626620", VA = "0x180627620", Slot = "5")]
|
|
[CompilerGenerated]
|
|
add
|
|
{
|
|
OnAuthenticationSuccededDelegate onAuthenticationSucceded;
|
|
Delegate @delegate;
|
|
do
|
|
{
|
|
onAuthenticationSucceded = this.OnAuthenticationSucceded;
|
|
@delegate = Delegate.Combine(onAuthenticationSucceded, value);
|
|
}
|
|
while (@delegate != 0 && @delegate == 0);
|
|
while (@delegate != onAuthenticationSucceded)
|
|
{
|
|
}
|
|
}
|
|
[Token(Token = "0x6009A20")]
|
|
[Address(RVA = "0x627760", Offset = "0x626760", VA = "0x180627760", Slot = "6")]
|
|
[CompilerGenerated]
|
|
remove
|
|
{
|
|
OnAuthenticationSuccededDelegate onAuthenticationSucceded;
|
|
Delegate @delegate;
|
|
do
|
|
{
|
|
onAuthenticationSucceded = this.OnAuthenticationSucceded;
|
|
@delegate = Delegate.Remove(onAuthenticationSucceded, value);
|
|
}
|
|
while (@delegate != 0 && @delegate == 0);
|
|
while (@delegate != onAuthenticationSucceded)
|
|
{
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x140000CB RID: 203
|
|
// (add) Token: 0x06009A21 RID: 39457 RVA: 0x001F7C34 File Offset: 0x001F5E34
|
|
// (remove) Token: 0x06009A22 RID: 39458 RVA: 0x001F7C5C File Offset: 0x001F5E5C
|
|
[Token(Token = "0x140000CB")]
|
|
public event OnAuthenticationFailedDelegate OnAuthenticationFailed
|
|
{
|
|
[Token(Token = "0x6009A21")]
|
|
[Address(RVA = "0x627580", Offset = "0x626580", VA = "0x180627580", Slot = "7")]
|
|
[CompilerGenerated]
|
|
add
|
|
{
|
|
OnAuthenticationFailedDelegate onAuthenticationFailed;
|
|
Delegate @delegate;
|
|
do
|
|
{
|
|
onAuthenticationFailed = this.OnAuthenticationFailed;
|
|
@delegate = Delegate.Combine(onAuthenticationFailed, value);
|
|
}
|
|
while (@delegate != 0 && @delegate == 0);
|
|
while (@delegate != onAuthenticationFailed)
|
|
{
|
|
}
|
|
}
|
|
[Token(Token = "0x6009A22")]
|
|
[Address(RVA = "0x6276C0", Offset = "0x6266C0", VA = "0x1806276C0", Slot = "8")]
|
|
[CompilerGenerated]
|
|
remove
|
|
{
|
|
OnAuthenticationFailedDelegate onAuthenticationFailed;
|
|
Delegate @delegate;
|
|
do
|
|
{
|
|
onAuthenticationFailed = this.OnAuthenticationFailed;
|
|
@delegate = Delegate.Remove(onAuthenticationFailed, value);
|
|
}
|
|
while (@delegate != 0 && @delegate == 0);
|
|
while (@delegate != onAuthenticationFailed)
|
|
{
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x06009A23 RID: 39459 RVA: 0x001F7C84 File Offset: 0x001F5E84
|
|
[Token(Token = "0x6009A23")]
|
|
[Address(RVA = "0x627550", Offset = "0x626550", VA = "0x180627550")]
|
|
public DefaultAccessTokenAuthenticator(HubConnection connection)
|
|
{
|
|
this.StartAuthentication();
|
|
this._connection = connection;
|
|
}
|
|
|
|
// Token: 0x06009A24 RID: 39460 RVA: 0x0000220F File Offset: 0x0000040F
|
|
[Token(Token = "0x6009A24")]
|
|
[Address(RVA = "0x4242D0", Offset = "0x4232D0", VA = "0x1804242D0", Slot = "9")]
|
|
public void StartAuthentication()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06009A25 RID: 39461 RVA: 0x001F7CA0 File Offset: 0x001F5EA0
|
|
[Token(Token = "0x6009A25")]
|
|
[Address(RVA = "0x6271E0", Offset = "0x6261E0", VA = "0x1806271E0", Slot = "10")]
|
|
public void PrepareRequest(NEBIGEDJGPP request)
|
|
{
|
|
if (HTTPProtocolFactory.GetProtocolFromUri(request.FHCKMFKKHLK) == SupportedProtocols.HTTP)
|
|
{
|
|
Uri uri = request.NJIBHKPHKFF;
|
|
HubConnection connection = this._connection;
|
|
NegotiationResult <NegotiationResult>k__BackingField = connection.<NegotiationResult>k__BackingField;
|
|
if (<NegotiationResult>k__BackingField != 0)
|
|
{
|
|
string <AccessToken>k__BackingField = <NegotiationResult>k__BackingField.<AccessToken>k__BackingField;
|
|
if (connection == 0)
|
|
{
|
|
if (uri.Query != 0)
|
|
{
|
|
}
|
|
string text = uri.Query + "&";
|
|
string scheme = uri.Scheme;
|
|
string host = uri.Host;
|
|
int port = uri.Port;
|
|
string absolutePath = uri.AbsolutePath;
|
|
string <AccessToken>k__BackingField2 = this._connection.<NegotiationResult>k__BackingField.<AccessToken>k__BackingField;
|
|
string text2 = text + "access_token=" + <AccessToken>k__BackingField2;
|
|
Uri uri2 = new UriBuilder(scheme, host, port, absolutePath, text2).Uri;
|
|
}
|
|
}
|
|
request.NJIBHKPHKFF = uri;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06009A26 RID: 39462 RVA: 0x0000220F File Offset: 0x0000040F
|
|
[Token(Token = "0x6009A26")]
|
|
[Address(RVA = "0x4242D0", Offset = "0x4232D0", VA = "0x1804242D0", Slot = "11")]
|
|
public void PrepareWebSocket(WebSocket webSocket)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06009A27 RID: 39463 RVA: 0x001F7D68 File Offset: 0x001F5F68
|
|
[Token(Token = "0x6009A27")]
|
|
[Address(RVA = "0x6273B0", Offset = "0x6263B0", VA = "0x1806273B0", Slot = "12")]
|
|
public Uri PrepareUri(Uri uri)
|
|
{
|
|
HubConnection connection = this._connection;
|
|
NegotiationResult <NegotiationResult>k__BackingField = connection.<NegotiationResult>k__BackingField;
|
|
if (<NegotiationResult>k__BackingField != 0)
|
|
{
|
|
string <AccessToken>k__BackingField = <NegotiationResult>k__BackingField.<AccessToken>k__BackingField;
|
|
if (connection == 0)
|
|
{
|
|
if (uri.Query != 0)
|
|
{
|
|
}
|
|
string text = uri.Query + "&";
|
|
string scheme = uri.Scheme;
|
|
string host = uri.Host;
|
|
int port = uri.Port;
|
|
string absolutePath = uri.AbsolutePath;
|
|
string <AccessToken>k__BackingField2 = this._connection.<NegotiationResult>k__BackingField.<AccessToken>k__BackingField;
|
|
string text2 = text + "access_token=" + <AccessToken>k__BackingField2;
|
|
return new UriBuilder(scheme, host, port, absolutePath, text2).Uri;
|
|
}
|
|
}
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0400682E RID: 26670
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x400682E")]
|
|
private HubConnection _connection;
|
|
}
|
|
}
|