GenAuth DocsDocuments
Concepts
User Guide
Development Integration
AgentAuth
Metadata
Development Integration
Multi-tenant (beta)
Console Documentation
Multi-tenant Console
Tenant Console
Saas Application Demo
Concepts
User Guide
Development Integration
AgentAuth
Metadata
Development Integration
Multi-tenant (beta)
Console Documentation
Multi-tenant Console
Tenant Console
Saas Application Demo
Old version
Development Integration
  • API

  • SDK

    • Java

      • Installation and use
      • User authentication module

        • Login

        • Logout

        • Manage Token

        • Register

        • User information

        • Account Binding

        • MFA Factor Management

        • User-related resources

        • Message service

        • Authentication

        • Others

        • OIDC module
        • OAuth module
        • SAML module
        • CAS module
        • Events
      • Management module

    • Node.js

    • Python

  • Error Codes
  1. Development Integration
  2. /
  3. SDK
  4. /
  5. Java
  6. /
  7. User authentication module

  8. /
  9. CAS module

¶ GenAuth - Java SDK CAS module

Update time: 2025-07-23 07:34:21
Edit

CAS is the abbreviation of Central Authentication Service, an independent open command protocol.

¶ Initialization

Parameters when initializing AuthenticationClient:

  • appId <String> Application ID, required.

  • appHost <String> Full application address, such as https://sample-app.genauth.ai, without the final slash '/'.

  • protocol <ProtocolEnum> Protocol type, optional values ​​are OIDC, OAUTH, SAML, CAS, the default is OIDC.

¶ Example

// Initialize with AppId and AppHostAuthenticationClientOptions options = new AuthenticationClientOptions();
options.setAppId("AUTHING_APP_ID");
options.setAppHost("AUTHING_APP_HOST");
// protocol
options.setProtocol(ProtocolEnum.CAS.getValue());
AuthenticationClient authenticationClient = null;
try {
    authenticationClient = new AuthenticationClient(options);
} catch (IOException | ParseException e) {
    e.printStackTrace();
}

¶ Generate a user login link for the CAS protocol

authenticationClient.buildAuthorizeUrl(ICasParams options)

Generate a user login link for the CAS protocol

¶ Parameters

  • options <ICasParams> Parameters to be filled in when initiating authorized login.

  • options.service The service address requested.

¶ Example

// Splice CAS login link
//options.setProtocol(ProtocolEnum.CAS.getValue());

ICasParams iCasParams = new ICasParams();
iCasParams.setService("https://example.com");
String respDto = authenticationClient.buildAuthorizeUrl(iCasParams);

¶ Sample data

https://oidc1.genauth.ai/cas-idp/5f17a529f64fb009b794a2ff/login?service=https://example.com
Previous article: SAML module Next article: Events
  • Initialization
  • Generate a user login link for the CAS protocol

User identity management

Integrated third-party login
Customized authentication process

Enterprise internal management

Single sign-on
Multi-factor authentication
Permission management

Developer

Development Documentation
GitHub (opens new window)

Company

official@genauth.ai
16th Floor, Building B, Beichen Century Center, Chaoyang District, Beijing (Total)
Room 406, 4th Floor, Block B, No. 200, Tianfu Fifth Street, High-tech Zone, Chengdu (Branch)

© Beijing Steamory Technology Co., Ltd.