001package org.forgerock.openam.authentication.modules.oath.plugins; 002 003/* 004 * The contents of this file are subject to the terms of the Common Development and 005 * Distribution License (the License). You may not use this file except in compliance with the 006 * License. 007 * 008 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the 009 * specific language governing permission and limitations under the License. 010 * 011 * When distributing Covered Software, include this CDDL Header Notice in each file and include 012 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL 013 * Header, with the fields enclosed by brackets [] replaced by your own identifying 014 * information: "Portions copyright [year] [name of copyright owner]". 015 * 016 * Copyright 2015 ForgeRock AS. 017 */ 018 019import com.sun.identity.authentication.spi.AuthLoginException; 020 021/** 022 * Provided as an extension point to allow customised transformation of the OATH shared secret attribute. 023 * @supported.all.api 024 */ 025public interface SharedSecretProvider { 026 027 /** 028 * Takes the non-empty shared secret that is retrieved for a user and implements any processing needed for to 029 * return the byte array of the string value. 030 * the module will fail. 031 * 032 * @param secretKey shared secret value 033 * @return a byte array of the shared secret - this should not be null 034 * @throws AuthLoginException if an error occurs transforming the value 035 * and should cause the module to fail. 036 */ 037 byte[] getSharedSecret(String secretKey) throws AuthLoginException; 038 039}