GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Netwolf/Netwolf.Server/Users/IAccountProvider.cs at main · SkizNet/Netwolf

Expand file tree

/

IAccountProvider.cs

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
47 lines (37 loc) · 1.77 KB
/

IAccountProvider.cs

Copy path

File metadata and controls

47 lines (37 loc) · 1.77 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using Netwolf.Unicode;
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Security.Claims;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;
namespace Netwolf.Server.Users;
/// <summary>
/// Service defining an account/identity provider.
/// Methods for unsupported mechanisms should throw NotImplementedException.
/// </summary>
public interface IAccountProvider
{
string ProviderName { get; }
IEnumerable<AuthMechanism> SupportedMechanisms { get; }
/// <summary>
/// Given a string that is potentially of the form "username@realm", extracts
/// the username part from the string. If the string does not contain a '@' character,
/// it returns the string as is. No normalization is performed; use the methods
/// found in Netwolf.Unicode if normalization is needed.
/// </summary>
/// <param name="username"></param>
/// <returns></returns>
string ExtractUsername(ReadOnlySpan<byte> username)
{
var at = username.IndexOf((byte)'@');
return (at == -1 ? username : username[..at]).DecodeUtf8();
}
Task<ClaimsIdentity?> AuthenticatePlainAsync(string username, string password, CancellationToken cancellationToken);
Task<ScramParameters?> GetScramParametersAsync(string username, CancellationToken cancellationToken);
Task<ClaimsIdentity?> AuthenticateScramAsync(string username, string nonce, byte[] hash, ImmutableDictionary<char, string> extensionData, CancellationToken cancellationToken);
Task<ClaimsIdentity?> AuthenticateCertAsync(X509Certificate2 certificate, CancellationToken cancellationToken);
Task<ClaimsIdentity?> ImpersonateAsync(string username, CancellationToken cancellationToken);
}
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.