001/*
002 * nimbus-jose-jwt
003 *
004 * Copyright 2012-2016, Connect2id Ltd and contributors.
005 *
006 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use
007 * this file except in compliance with the License. You may obtain a copy of the
008 * License at
009 *
010 *    http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software distributed
013 * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
014 * CONDITIONS OF ANY KIND, either express or implied. See the License for the
015 * specific language governing permissions and limitations under the License.
016 */
017
018package com.nimbusds.jose.crypto.opts;
019
020
021import net.jcip.annotations.Immutable;
022
023import com.nimbusds.jose.JWSSignerOption;
024
025
026/**
027 * JSON Web Signature (JWS) option to prompt the user to authenticate in order
028 * to complete the signing operation. Android applications can use this option
029 * to trigger a biometric prompt that is required to unlock a private key
030 * created with {@code setUserAuthenticationRequired(true)}.
031 */
032@Immutable
033public final class UserAuthenticationRequired implements JWSSignerOption {
034        
035        
036        private static final UserAuthenticationRequired SINGLETON = new UserAuthenticationRequired();
037        
038        
039        /**
040         * Returns an instance of this class.
041         *
042         * @return The instance.
043         */
044        public static UserAuthenticationRequired getInstance() {
045                return SINGLETON;
046        }
047        
048        
049        private UserAuthenticationRequired() {
050        }
051        
052        
053        @Override
054        public String toString() {
055                return "UserAuthenticationRequired";
056        }
057}