PasswordServerResource.java revision 073875d677d0cc89aa2cc1187c975225a2ead9d3
/*
* The contents of this file are subject to the terms of the Common Development and
* Distribution License (the License). You may not use this file except in compliance with the
* License.
*
* You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
* specific language governing permission and limitations under the License.
*
* When distributing Covered Software, include this CDDL Header Notice in each file and include
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions Copyrighted [year] [name of copyright owner]".
*
* Copyright 2012-2014 ForgeRock AS. All rights reserved.
*/
/**
* Implements the Resource Owner Password Credentials Flow
*
* @see <a
* href="http://tools.ietf.org/html/rfc6749#section-4.3>4.3.
* Resource Owner Password Credentials Grant</a>
*/
public class PasswordServerResource extends AbstractFlow {
@Post("form:json")
// Authenticate ResourceOwner
} else {
}
} else {
"SecretVerifier is not set in the Context");
}
// Get the requested scope
// Validate the granted scope
if (checkIfRefreshTokenIsRequired(getRequest())) {
} else {
}
//execute post token creation pre return scope plugin for extra return data.
}
}
protected String[] getRequiredParameters() {
}
/**
* This method is intended to be overridden by subclasses.
*
* @param checkedScope
* @return
* @throws org.forgerock.openam.oauth2.exceptions.OAuthProblemException
*
*/
} else {
resourceOwner.getIdentifier(), client.getClient().getClientId(), null, null, token.getTokenID(), getGrantType());
}
}
/**
* This method is intended to be overridden by subclasses.
*
* @param checkedScope
* @return
* @throws org.forgerock.openam.oauth2.exceptions.OAuthProblemException
*
*/
}
}