FRAMessageUtils.h revision 5d37db6a3aca50ba14cba8909d3ae44f7d43e407
b3a21de0a0e0a5dea71bece7e5c0356700136fbcDiego Colantoni * The contents of this file are subject to the terms of the Common Development and
b3a21de0a0e0a5dea71bece7e5c0356700136fbcDiego Colantoni * Distribution License (the License). You may not use this file except in compliance with the
b3a21de0a0e0a5dea71bece7e5c0356700136fbcDiego Colantoni * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
b3a21de0a0e0a5dea71bece7e5c0356700136fbcDiego Colantoni * specific language governing permission and limitations under the License.
b3a21de0a0e0a5dea71bece7e5c0356700136fbcDiego Colantoni * When distributing Covered Software, include this CDDL Header Notice in each file and include
b3a21de0a0e0a5dea71bece7e5c0356700136fbcDiego Colantoni * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
b3a21de0a0e0a5dea71bece7e5c0356700136fbcDiego Colantoni * Header, with the fields enclosed by brackets [] replaced by your own identifying
b3a21de0a0e0a5dea71bece7e5c0356700136fbcDiego Colantoni * information: "Portions copyright [year] [name of copyright owner]".
b3a21de0a0e0a5dea71bece7e5c0356700136fbcDiego Colantoni * Copyright 2016 ForgeRock AS.
b3a21de0a0e0a5dea71bece7e5c0356700136fbcDiego Colantoni * Class that handles communication with OpenAM.
b3a21de0a0e0a5dea71bece7e5c0356700136fbcDiego Colantoni * POST request method.
b3a21de0a0e0a5dea71bece7e5c0356700136fbcDiego Colantoni * @param endpoint The URL string used to create the request URL.
b3a21de0a0e0a5dea71bece7e5c0356700136fbcDiego Colantoni * @param base64Secret The secret used to sign the JWT.
b3a21de0a0e0a5dea71bece7e5c0356700136fbcDiego Colantoni * @param messageId The id of the message.
b3a21de0a0e0a5dea71bece7e5c0356700136fbcDiego Colantoni * @param data The payload to transmit with the request.
b3a21de0a0e0a5dea71bece7e5c0356700136fbcDiego Colantoni * @param handler A block object to be executed when the task finishes.
a1e92b2783be4bfeb0c7e267223cc7779a6f324cKen Stubbings+ (void)respondWithEndpoint:(NSString *)endpoint
5d37db6a3aca50ba14cba8909d3ae44f7d43e407Ken Stubbings loadBalancerCookieData:(NSString *)loadBalancerCookieData
a1e92b2783be4bfeb0c7e267223cc7779a6f324cKen Stubbings handler:(void (^)(NSInteger statusCode, NSError *error))handler;
b3a21de0a0e0a5dea71bece7e5c0356700136fbcDiego Colantoni * POST request method.
b3a21de0a0e0a5dea71bece7e5c0356700136fbcDiego Colantoni * @param endpoint The URL string used to create the request URL.
b3a21de0a0e0a5dea71bece7e5c0356700136fbcDiego Colantoni * @param base64Secret The secret used to sign the JWT.
b3a21de0a0e0a5dea71bece7e5c0356700136fbcDiego Colantoni * @param messageId The id of the message.
b3a21de0a0e0a5dea71bece7e5c0356700136fbcDiego Colantoni * @param data The payload to transmit with the request.
b3a21de0a0e0a5dea71bece7e5c0356700136fbcDiego Colantoni * @param protocol The protocol used to process URLs.
b3a21de0a0e0a5dea71bece7e5c0356700136fbcDiego Colantoni * @param handler A block object to be executed when the task finishes.
a1e92b2783be4bfeb0c7e267223cc7779a6f324cKen Stubbings+ (void)respondWithEndpoint:(NSString *)endpoint
5d37db6a3aca50ba14cba8909d3ae44f7d43e407Ken Stubbings loadBalancerCookieData:(NSString *)loadBalancerCookieData
a1e92b2783be4bfeb0c7e267223cc7779a6f324cKen Stubbings handler:(void (^)(NSInteger statusCode, NSError *error))handler;
a1e92b2783be4bfeb0c7e267223cc7779a6f324cKen Stubbings * Generate challenge response.
a1e92b2783be4bfeb0c7e267223cc7779a6f324cKen Stubbings * @param challenge The challenge.
a1e92b2783be4bfeb0c7e267223cc7779a6f324cKen Stubbings * @param secret The secret.
a1e92b2783be4bfeb0c7e267223cc7779a6f324cKen Stubbings * @return The challenge response.
a1e92b2783be4bfeb0c7e267223cc7779a6f324cKen Stubbings+ (NSString *) generateChallengeResponse:(NSString *) challenge secret:(NSString *) secret;
a1e92b2783be4bfeb0c7e267223cc7779a6f324cKen Stubbings * Extracts the data from the body of a JWT string;
a1e92b2783be4bfeb0c7e267223cc7779a6f324cKen Stubbings * @param message the compleye JWT string
a1e92b2783be4bfeb0c7e267223cc7779a6f324cKen Stubbings * @NSDictionary the data from the body of the JWT