202 lines
6.7 KiB
C#
202 lines
6.7 KiB
C#
using System;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Runtime.InteropServices;
|
|
using BestHTTP.SignalRCore.Messages;
|
|
using BestHTTP.WebSocket;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SignalRCore.Authentication
|
|
{
|
|
// Token: 0x0200131A RID: 4890
|
|
[Token(Token = "0x200131A")]
|
|
[StructLayout(3)]
|
|
public sealed class DefaultAccessTokenAuthenticator : IAuthenticationProvider
|
|
{
|
|
// Token: 0x170013F3 RID: 5107
|
|
// (get) Token: 0x06007A76 RID: 31350 RVA: 0x00197160 File Offset: 0x00195360
|
|
[Token(Token = "0x170013F3")]
|
|
public bool IsPreAuthRequired
|
|
{
|
|
[Token(Token = "0x6007A76")]
|
|
[Address(RVA = "0x413970", Offset = "0x412370", VA = "0x180413970", Slot = "4")]
|
|
get
|
|
{
|
|
}
|
|
}
|
|
|
|
// Token: 0x140000B6 RID: 182
|
|
// (add) Token: 0x06007A77 RID: 31351 RVA: 0x00197170 File Offset: 0x00195370
|
|
// (remove) Token: 0x06007A78 RID: 31352 RVA: 0x00197198 File Offset: 0x00195398
|
|
[Token(Token = "0x140000B6")]
|
|
public event OnAuthenticationSuccededDelegate OnAuthenticationSucceded
|
|
{
|
|
[Token(Token = "0x6007A77")]
|
|
[Address(RVA = "0x52A2A0", Offset = "0x528CA0", VA = "0x18052A2A0", 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 = "0x6007A78")]
|
|
[Address(RVA = "0x52A3E0", Offset = "0x528DE0", VA = "0x18052A3E0", 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: 0x140000B7 RID: 183
|
|
// (add) Token: 0x06007A79 RID: 31353 RVA: 0x001971C0 File Offset: 0x001953C0
|
|
// (remove) Token: 0x06007A7A RID: 31354 RVA: 0x001971E8 File Offset: 0x001953E8
|
|
[Token(Token = "0x140000B7")]
|
|
public event OnAuthenticationFailedDelegate OnAuthenticationFailed
|
|
{
|
|
[Token(Token = "0x6007A79")]
|
|
[Address(RVA = "0x52A200", Offset = "0x528C00", VA = "0x18052A200", 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 = "0x6007A7A")]
|
|
[Address(RVA = "0x52A340", Offset = "0x528D40", VA = "0x18052A340", 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: 0x06007A7B RID: 31355 RVA: 0x00197210 File Offset: 0x00195410
|
|
[Token(Token = "0x6007A7B")]
|
|
[Address(RVA = "0x52A1D0", Offset = "0x528BD0", VA = "0x18052A1D0")]
|
|
public DefaultAccessTokenAuthenticator(HubConnection connection)
|
|
{
|
|
this.StartAuthentication();
|
|
this._connection = connection;
|
|
}
|
|
|
|
// Token: 0x06007A7C RID: 31356 RVA: 0x0000220F File Offset: 0x0000040F
|
|
[Token(Token = "0x6007A7C")]
|
|
[Address(RVA = "0x3C9F60", Offset = "0x3C8960", VA = "0x1803C9F60", Slot = "9")]
|
|
public void StartAuthentication()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06007A7D RID: 31357 RVA: 0x0019722C File Offset: 0x0019542C
|
|
[Token(Token = "0x6007A7D")]
|
|
[Address(RVA = "0x529E60", Offset = "0x528860", VA = "0x180529E60", 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: 0x06007A7E RID: 31358 RVA: 0x0000220F File Offset: 0x0000040F
|
|
[Token(Token = "0x6007A7E")]
|
|
[Address(RVA = "0x3C9F60", Offset = "0x3C8960", VA = "0x1803C9F60", Slot = "11")]
|
|
public void PrepareWebSocket(WebSocket webSocket)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06007A7F RID: 31359 RVA: 0x001972F4 File Offset: 0x001954F4
|
|
[Token(Token = "0x6007A7F")]
|
|
[Address(RVA = "0x52A030", Offset = "0x528A30", VA = "0x18052A030", 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: 0x04005832 RID: 22578
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4005832")]
|
|
private HubConnection _connection;
|
|
}
|
|
}
|