Changeset 644b808


Ignore:
Timestamp:
2011-12-26T10:50:34Z (12 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
5f40da7
Parents:
9a1c14d
Message:

A few more minor cleanups before merging this into mainline.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • lib/oauth2.c

    r9a1c14d r644b808  
    117117                atoken = oauth2_json_dumb_get( req->reply_body, "access_token" );
    118118                rtoken = oauth2_json_dumb_get( req->reply_body, "refresh_token" );
    119                 if( getenv( "BITLBEE_DEBUG" ) )
    120                         printf( "Extracted atoken=%s rtoken=%s\n", atoken, rtoken );
    121119        }
    122120        else
     
    130128                oauth_params_free( &p_in );
    131129        }
     130        if( getenv( "BITLBEE_DEBUG" ) )
     131                printf( "Extracted atoken=%s rtoken=%s\n", atoken, rtoken );
     132       
    132133        cb_data->func( cb_data->data, atoken, rtoken );
    133134        g_free( atoken );
  • protocols/jabber/sasl.c

    r9a1c14d r644b808  
    105105        }
    106106       
    107         if( !sup_plain && !sup_digest && !sup_gtalk && !sup_fb && !sup_ms )
    108         {
    109                 imcb_error( ic, "BitlBee does not support any of the offered SASL "
    110                                 "authentication schemes:%s", mechs->str );
     107        if( !sup_plain && !sup_digest )
     108        {
     109                if( !sup_gtalk && !sup_fb && !sup_ms )
     110                        imcb_error( ic, "This server requires OAuth "
     111                                        "(supported schemes:%s)", mechs->str );
     112                else
     113                        imcb_error( ic, "BitlBee does not support any of the offered SASL "
     114                                        "authentication schemes:%s", mechs->str );
    111115                imc_logout( ic, FALSE );
    112116                g_string_free( mechs, TRUE );
     
    294298        if( jd->flags & JFLAG_SASL_FB )
    295299        {
    296                 /* Facebook proprietary authentication. Not as useful as it seemed, but
    297                    the code's written now, may as well keep it..
    298                    
    299                    Mechanism is described on http://developers.facebook.com/docs/chat/
    300                    and in their Python module. It's all mostly useless because the tokens
    301                    expire after 24h. */
     300                /* New-style Facebook OAauth2 support. Instead of sending a refresh
     301                   token, they just send an access token that should never expire. */
    302302                GSList *p_in = NULL, *p_out = NULL;
    303303                char time[33];
  • root_commands.c

    r9a1c14d r644b808  
    459459                                             "enter the password" );
    460460                                if( oauth )
    461                                         irc_rootmsg( irc, "Alternatively, enable oauth if "
     461                                        irc_rootmsg( irc, "Alternatively, enable OAuth if "
    462462                                                     "the account supports it: account %s "
    463463                                                     "set oauth on", a->tag );
Note: See TracChangeset for help on using the changeset viewer.