HitGeneralServices 0.4.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package HitGeneralServices --version 0.4.1.1                
NuGet\Install-Package HitGeneralServices -Version 0.4.1.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="HitGeneralServices" Version="0.4.1.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add HitGeneralServices --version 0.4.1.1                
#r "nuget: HitGeneralServices, 0.4.1.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install HitGeneralServices as a Cake Addin
#addin nuget:?package=HitGeneralServices&version=0.4.1.1

// Install HitGeneralServices as a Cake Tool
#tool nuget:?package=HitGeneralServices&version=0.4.1.1                

<div align=center> <img src="images/Full_2048.png" width = 30% height = 30% /> </div>

HitGeneralServices-HIT通用服务集

nuget Nuget GitHub GitHub last commit GitHub Workflow Status GitHub repo size GitHub code size

View at Nuget.org

HIT通用服务集包含了以下常用的组件:

  • HitInfoProviderFactory: 用于获取乐学网认证登录后,用户信息的工厂类
  • CasLogin.LoginHttpClient:用于使用统一身份认证登录的HttpClient

HitInfoProviderFactory 使用方法

将需要使用的服务,加入依赖注入的服务集合即可

CasLogin.LoginHttpClient 使用方法

既可以使用依赖注入初始化,也可以直接使用new来创建LoginHttpClient的实例。LoginHttpClient直接继承自HttpClient,可以像HttpClient一样使用。除此外,还提供了以下成员:

名称 类型 说明 参数 返回值 异常
LoginAsync 异步方法 进行统一认证登录 string username用户名<br> string password密码<br> Func<Stream, Task<string>>? captchaGenerator可选。 验证码填写适配器,用于在必须时填写验证码。 - CaptchaRequiredException: 需要填写二维码,但是未提供对应的适配器<br>LoginFailedException: 登陆认证失败,原因见Message
TryLoginFor 异步方法 持续尝试进行统一认证登录,直至满足最大尝试次数,或者抛出不能处理的异常 string username用户名<br> string password密码<br> uint maxTrail最大尝试次数<br> Func<Stream, Task<string>>? captchaGenerator可选。 验证码填写适配器,用于在必须时填写验证码。 - CaptchaRequiredException: 需要填写二维码,但是未提供对应的适配器<br>LoginFailedException: 登陆认证失败,原因见Message
IsAuthorized 异步方法 检查是否已经完成统一认证登录 - bool,是/否 -
Win32CaptchaInput 静态函数(验证码填写适配器) 适用于控制台程序。 使用Windows默认图片查看器查看验证码图片 - - -
CaptchaInputFactory 静态函数(验证码填写适配器工厂) 适用于控制台程序。 使用指定查看器生成验证码填写适配器 string pathToJpegViewerJpeg查看器的路径 验证码填写适配器 -
Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on HitGeneralServices:

Package Downloads
HitRefresh.Schedule

Helps to convert schedule of HIT.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.5.3 640 8/23/2022
0.5.2 577 4/14/2022
0.5.1 1,181 2/16/2022
0.5.0 428 2/16/2022
0.4.4 436 1/15/2022
0.4.3.2 450 1/14/2022
0.4.3.1 459 1/13/2022
0.4.3 282 1/9/2022
0.4.2 281 12/20/2021
0.4.1.2 327 10/15/2021
0.4.1.1 334 10/15/2021
0.4.1 372 10/15/2021
0.4.0 330 10/14/2021
0.3.0 337 3/29/2021
0.2.0 335 3/29/2021
0.1.0 347 3/28/2021

版本0.4.1.1:增强了CAS登录模块.