aboutsummaryrefslogtreecommitdiff
path: root/Libs/VNLib.Plugins.Essentials.Oauth/VNLib.Plugins.Essentials.Oauth.xml
blob: 8427e9ebbbe97757c67ebfa6a7705e28b9192fdc (plain)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<?xml version="1.0"?>
<!--
Copyright (c) 2022 Vaughn Nugent
-->
<doc>
    <assembly>
        <name>VNLib.Plugins.Essentials.Oauth</name>
    </assembly>
    <members>
        <member name="T:VNLib.Plugins.Essentials.Oauth.Applications">
            <summary>
            A DbStore for <see cref="T:VNLib.Plugins.Essentials.Oauth.UserApplication"/>s for OAuth2 client applications
            </summary>
        </member>
        <member name="M:VNLib.Plugins.Essentials.Oauth.Applications.#ctor(Microsoft.EntityFrameworkCore.DbContextOptions,VNLib.Plugins.Essentials.Accounts.PasswordHashing,System.String,System.String)">
            <summary>
            Initializes a new <see cref="T:VNLib.Plugins.Essentials.Oauth.Applications"/> data store
            uisng the specified EFCore <see cref="T:Microsoft.EntityFrameworkCore.DbContextOptions"/> object.
            </summary>
            <param name="ConextOptions">EFCore context options for connecting to a remote data-store</param>
            <param name="secretHashing">A <see cref="T:VNLib.Plugins.Essentials.Accounts.PasswordHashing"/> structure for hashing client secrets</param>
            <param name="tableName">The name of the applications table</param>
            <param name="tokenTableName">The name of the active OAuth2 token table</param>
        </member>
        <member name="M:VNLib.Plugins.Essentials.Oauth.Applications.UpdateSecretAsync(System.String,System.String)">
            <summary>
            Updates the secret of an application, and if successful returns the new raw secret data
            </summary>
            <param name="userId">The user-id of that owns the application</param>
            <param name="appId">The id of the application to update</param>
            <returns>A task that resolves to the raw secret that was used to generate the hash, or null if the operation failed</returns>
        </member>
        <member name="M:VNLib.Plugins.Essentials.Oauth.Applications.VerifyAppAsync(System.String,VNLib.Utils.Memory.PrivateString)">
            <summary>
            Attempts to retreive an application by the specified client id and compares the raw secret against the 
            stored secret hash.
            </summary>
            <param name="clientId">The clientid of the application to search</param>
            <param name="secret">The secret to compare against</param>
            <param name="app">The found application</param>
            <returns>True if the application was found and the secret matches the stored secret, false if the appliation was not found or the secret does not match</returns>
        </member>
        <member name="M:VNLib.Plugins.Essentials.Oauth.Applications.DeleteActiveTokensAsync(System.String)">
            <summary>
            Deletes all active tokens 
            </summary>
            <param name="appid"></param>
        </member>
        <member name="M:VNLib.Plugins.Essentials.Oauth.Applications.GenerateSecret">
            <summary>
            Generates a client application secret using the <see cref="T:VNLib.Hashing.RandomHash"/> library
            </summary>
            <returns>The RNG secret</returns>
        </member>
        <member name="M:VNLib.Plugins.Essentials.Oauth.Applications.CreateAsync(VNLib.Plugins.Essentials.Oauth.UserApplication)">
            <summary>
            Creates and initializes a new <see cref="T:VNLib.Plugins.Essentials.Oauth.UserApplication"/> with a random clientid and 
            secret that must be disposed
            </summary>
            <param name="record">The new record to create</param>
            <returns>The result of the operation</returns>
        </member>
        <member name="M:VNLib.Plugins.Essentials.Oauth.Applications.GenerateClientID">
            <summary>
            Generates a new client ID using the <see cref="T:VNLib.Hashing.RandomHash"/> library
            </summary>
            <returns>The new client ID</returns>
        </member>
        <member name="P:VNLib.Plugins.Essentials.Oauth.Applications.RecordIdBuilder">
            <inheritdoc/>
        </member>
        <member name="M:VNLib.Plugins.Essentials.Oauth.Applications.NewContext">
            <inheritdoc/>
        </member>
        <member name="M:VNLib.Plugins.Essentials.Oauth.Applications.AddOrUpdateQueryBuilder(VNLib.Plugins.Extensions.Data.TransactionalDbContext,VNLib.Plugins.Essentials.Oauth.UserApplication)">
            <inheritdoc/>
        </member>
        <member name="M:VNLib.Plugins.Essentials.Oauth.Applications.OnRecordUpdate(VNLib.Plugins.Essentials.Oauth.UserApplication,VNLib.Plugins.Essentials.Oauth.UserApplication)">
            <inheritdoc/>
        </member>
        <member name="M:VNLib.Plugins.Essentials.Oauth.Applications.GetCollectionQueryBuilder(VNLib.Plugins.Extensions.Data.TransactionalDbContext,System.String)">
            <inheritdoc/>
        </member>
        <member name="M:VNLib.Plugins.Essentials.Oauth.Applications.GetCollectionQueryBuilder(VNLib.Plugins.Extensions.Data.TransactionalDbContext,System.String[])">
            <inheritdoc/>
        </member>
        <member name="M:VNLib.Plugins.Essentials.Oauth.Applications.GetSingleQueryBuilder(VNLib.Plugins.Extensions.Data.TransactionalDbContext,System.String[])">
            <inheritdoc/>
        </member>
        <member name="M:VNLib.Plugins.Essentials.Oauth.Applications.GetSingleQueryBuilder(VNLib.Plugins.Extensions.Data.TransactionalDbContext,VNLib.Plugins.Essentials.Oauth.UserApplication)">
            <inheritdoc/>
        </member>
        <member name="M:VNLib.Plugins.Essentials.Oauth.Applications.UpdateQueryBuilder(VNLib.Plugins.Extensions.Data.TransactionalDbContext,VNLib.Plugins.Essentials.Oauth.UserApplication)">
            <inheritdoc/>
        </member>
        <member name="T:VNLib.Plugins.Essentials.Oauth.Sessions.O2SessionHandle">
            <summary>
            Provides a one-time-use handle (similar to asyncReleaser, or openHandle) 
            that holds exclusive access to a session until it is released
            </summary>
        </member>
        <member name="T:VNLib.Plugins.Essentials.Oauth.Sessions.OAuthSessionStore">
            <summary>
            Provides OAuth2 sessions (with caching) using VNLib caching store
            </summary>
        </member>
        <member name="M:VNLib.Plugins.Essentials.Oauth.Sessions.OAuthSessionStore.#ctor(System.Func{System.Data.Common.DbConnection},System.String,System.Int32,System.Func{System.String})">
            <summary>
            Initializes a new <see cref="T:VNLib.Plugins.Essentials.Oauth.Sessions.OAuthSessionStore"/>
            </summary>
            <param name="connectionFactory">The a <see cref="T:System.Data.Common.DbConnection"/> factory function</param>
            <param name="tableName">The name of the table that the backing store indexes</param>
            <param name="maxCacheItems">The maximum number of sessions to keep in memory</param>
            <param name="accessTokenFactory">A secure access token factory function</param>
        </member>
        <member name="M:VNLib.Plugins.Essentials.Oauth.Sessions.OAuthSessionStore.GetActiveTokenCountAsync(System.String)">
            <summary>
            Asynchronously gets the number of active tokens for a given application
            </summary>
            <param name="appId">The application id to get the count of</param>
            <returns>A task that resolves the number of active tokens</returns>
        </member>
        <member name="M:VNLib.Plugins.Essentials.Oauth.Sessions.OAuthSessionStore.GetSessionAsync(System.String,System.Threading.CancellationToken)">
            <summary>
            Gets a session handle for the current token to attach to a connection
            </summary>
            <param name="sessionId">The access token (or session id) to get the session of</param>
            <param name="cancellationToken">A token to cancel the operation</param>
            <returns>A task the resolves a <see cref="T:VNLib.Plugins.Essentials.Sessions.ISessionHandle"/> around the session to connect to the token and entity</returns>
            <exception cref="T:VNLib.Plugins.Essentials.Sessions.SessionException"></exception>
            <exception cref="T:System.OperationCanceledException"></exception>
        </member>
        <member name="M:VNLib.Plugins.Essentials.Oauth.Sessions.OAuthSessionStore.CreateSessionAsync(System.String,System.Net.IPAddress,System.Threading.CancellationToken)">
            <summary>
            Creates a new OAuth2 session in the store and returns a handle to the new session
            </summary>
            <param name="appId">The application id</param>
            <param name="userIp">The IP address of the client that created the token</param>
            <param name="cancellationToken">A token to cancel the operation</param>
            <returns>A task that compeltes with an <see cref="T:VNLib.Plugins.Essentials.Sessions.ISessionHandle"/> used to release the session</returns>
            <exception cref="T:System.ObjectDisposedException"></exception>
        </member>
        <member name="P:VNLib.Plugins.Essentials.Oauth.OauthSession.Released">
            <summary>
            A value that indicates if the session has been released, returns false if the instance has not been initialized
            </summary>
        </member>
        <member name="M:VNLib.Plugins.Essentials.Oauth.OauthSession.WaitAndLoadAsync(System.Net.IPAddress,System.Threading.CancellationToken)">
            <summary>
            Waits for exclusive access to the resource and lazily initializes the resource 
            from its backing store
            </summary>
            <param name="userIp">Optional ipaddressfor initalization</param>
            <param name="cancellationToken">A token to cancel the operation</param>
            <returns>A task the resolves to a value that indicates if the session is in a usable state</returns>
        </member>
    </members>
</doc>