Skip to content

Conversation

nilsbehlen
Copy link
Member

No description provided.

@nilsbehlen nilsbehlen linked an issue Aug 29, 2025 that may be closed by this pull request
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for smartphone container types in PIResponse, treating them as equivalent to push tokens for authentication purposes.

  • Introduces CONTAINER_TYPE_SMARTPHONE constant to handle smartphone container types
  • Updates all push-related methods to also consider smartphone containers as push tokens
  • Refactors duplicate type checking logic into a reusable helper method

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
PIConstants.java Adds CONTAINER_TYPE_SMARTPHONE constant and updates comment to reflect container types
PIResponse.java Updates push token detection to include smartphone containers and refactors type checking logic

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 56 to 57
public String passkeyChallenge = "";
public String passkeyMessage = "";
public String passkeyRegistration = "";
Copy link
Preview

Copilot AI Aug 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The removal of passkeyMessage field appears unrelated to the PR's purpose of considering container types. This change should be in a separate commit or explained in the PR description to maintain clear change separation.

Copilot uses AI. Check for mistakes.

Comment on lines +27 to +29
import static org.privacyidea.PIConstants.CONTAINER_TYPE_SMARTPHONE;
import static org.privacyidea.PIConstants.TOKEN_TYPE_PUSH;
import static org.privacyidea.PIConstants.TOKEN_TYPE_WEBAUTHN;
Copy link
Preview

Copilot AI Aug 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider maintaining alphabetical order in static imports for better readability and consistency.

Suggested change
import static org.privacyidea.PIConstants.CONTAINER_TYPE_SMARTPHONE;
import static org.privacyidea.PIConstants.TOKEN_TYPE_PUSH;
import static org.privacyidea.PIConstants.TOKEN_TYPE_WEBAUTHN;
import static org.privacyidea.PIConstants.TOKEN_TYPE_PUSH;
import static org.privacyidea.PIConstants.TOKEN_TYPE_WEBAUTHN;
import static org.privacyidea.PIConstants.CONTAINER_TYPE_SMARTPHONE;

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

functions for container enrollment in PIResponse
1 participant