如何验证yammer网络中存在的用户

时间:2015-09-07 13:22:26

标签: single-sign-on yammer

我启用了SSO,并且在yammer中注册的用户工作正常,但是对于尚未在yammer中注册的用户会出错 :::如何收听SSO错误:::

用于SSO的破解代码

//<-- PLAY TRACK -->
this.playTrack = function(track, number) {

    var that = this;

    SC.stream("/tracks/" + track, {onfinish: function() { 
        that.onFinish(number);
    }}, 

    function (sound) {
        that.stream = sound;
        that.currentTrack = track;

        var trackName = $(that.track_links[number]).html();
        trackName = trackName.replace(/\d.\s/, "");
        that.player.find(".current-track").css("display", "block");
        that.player.find(".current-track").children("p").html(trackName);

        sound.play({
            whileplaying: function () {
                that.player.find(".progress").css('width', ((sound.position / sound.duration) * 100) + '%');
                that.player.find(".playtime").html(that.minutesAndSeconds(sound.position));
            },
        });

        that.updateProgress(sound);

    that.playing = true;
    }); 
}

但无法收到任何回复

1 个答案:

答案 0 :(得分:0)

使用以下代码,您可以在yammer上验证用户身份。要获得成功的身份验证,您将获得&#34; authenticationResponse&#34;。

   string authorizeCode = Request.Params.Get("code");
    var yammerClientID = your client id;
    var yammerClientSecret = your client secret;
    string authenticateUrl = String.Format("https://www.yammer.com/oauth2/access_token.json?client_id={0}&client_secret={1}&code={2}", yammerClientID, yammerClientSecret, authorizeCode);
    try
    {
    authenticationResponse = cli.DownloadString(authenticateUrl);
    }
    catch
    {
    //Code                                        
    }

如果这不能解决您的问题,请在此处分享您的代码。