LCOV - code coverage report
Current view: top level - httpd/auth/openid - DiscoveryResult.java (source / functions) Hit Total Coverage
Test: _coverage_report.dat Lines: 0 13 0.0 %
Date: 2022-11-19 15:00:39 Functions: 0 4 0.0 %

          Line data    Source code
       1             : // Copyright (C) 2009 The Android Open Source Project
       2             : //
       3             : // Licensed under the Apache License, Version 2.0 (the "License");
       4             : // you may not use this file except in compliance with the License.
       5             : // You may obtain a copy of the License at
       6             : //
       7             : // http://www.apache.org/licenses/LICENSE-2.0
       8             : //
       9             : // Unless required by applicable law or agreed to in writing, software
      10             : // distributed under the License is distributed on an "AS IS" BASIS,
      11             : // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      12             : // See the License for the specific language governing permissions and
      13             : // limitations under the License.
      14             : 
      15             : package com.google.gerrit.httpd.auth.openid;
      16             : 
      17             : import java.util.Map;
      18             : 
      19             : final class DiscoveryResult {
      20           0 :   enum Status {
      21             :     /** Provider was discovered and {@code providerUrl} is valid. */
      22           0 :     VALID,
      23             : 
      24             :     /** Identifier isn't for an OpenID provider. */
      25           0 :     NO_PROVIDER,
      26             : 
      27             :     /** The provider was discovered, but something else failed. */
      28           0 :     ERROR
      29             :   }
      30             : 
      31             :   Status status;
      32             :   String providerUrl;
      33             :   Map<String, String> providerArgs;
      34             : 
      35           0 :   DiscoveryResult() {}
      36             : 
      37           0 :   DiscoveryResult(String redirect, Map<String, String> args) {
      38           0 :     status = Status.VALID;
      39           0 :     providerUrl = redirect;
      40           0 :     providerArgs = args;
      41           0 :   }
      42             : 
      43           0 :   DiscoveryResult(Status s) {
      44           0 :     status = s;
      45           0 :   }
      46             : }

Generated by: LCOV version 1.16+git.20220603.dfeb750