Skip to content

Instantly share code, notes, and snippets.

private string extractRefreshToken(string jwtPayload){
Map<String, Object> jwtMap = (Map<String, Object>)JSON.deserializeUntyped(jwtPayload);
Map<String, Object> requestMap = (Map<String, Object>)jwtMap.get('request');
Map<String, Object> restMap = (Map<String, Object>)requestMap.get('rest');
string refreshToken = (string)restMap.get('refreshToken');
return refreshToken;
}
private string decodeJwt(String base64url){
@zzc000
zzc000 / DividerItemDecoration.java
Created September 30, 2015 16:56 — forked from alexfu/DividerItemDecoration.java
An ItemDecoration that draws dividers between items. Pulled from Android support demos.
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@zzc000
zzc000 / CrmContext.cs
Created July 26, 2012 06:30
CrmContext
using System;
using System.Collections.Generic;
using System.Data.Services;
using Microsoft.Xrm.Client;
using Microsoft.Xrm.Client.Configuration;
using Microsoft.Xrm.Client.Messages;
using Microsoft.Xrm.Sdk;
namespace CrmOrganizationServiceContextExtensions
{
@zzc000
zzc000 / ICrmOrganizationServiceContext.cs
Created July 26, 2012 06:27
ICrmOrganizationServiceContext
using System;
namespace CrmOrganizationServiceContextExtensions
{
public interface ICrmOrganizationServiceContext
{
/*
* Microsoft.Xrm.Client.Messages.OrganizationServiceContextExtensions
*/
Guid AddItemCampaign(Guid campaignId, Guid entityId, string entityName);