<s> from __future__ import absolute_import , print_function <EOL> from bitfield import BitField <EOL> from django . db import models <EOL> from django . utils import timezone <EOL> from jsonfield import JSONField <EOL> from sentry . db . models import ( <EOL> BoundedPositiveIntegerField , FlexibleForeignKey , Model , sane_repr <EOL> ) <EOL> class AuthProvider ( Model ) : <EOL> organization = FlexibleForeignKey ( '<STR_LIT>' , unique = True ) <EOL> provider = models . CharField ( max_length = <NUM_LIT> ) <EOL> config = JSONField ( ) <EOL> date_added = models . DateTimeField ( default = timezone . now ) <EOL> sync_time = BoundedPositiveIntegerField ( null = True ) <EOL> last_sync = models . DateTimeField ( null = True ) <EOL> default_role = BoundedPositiveIntegerField ( default = <NUM_LIT:50> ) <EOL> default_global_access = models . BooleanField ( default = True ) <EOL> default_teams = models . ManyToManyField ( '<STR_LIT>' , blank = True ) <EOL> flags = BitField ( flags = ( <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ) , default = <NUM_LIT:0> ) <EOL> class Meta : <EOL> app_label = '<STR_LIT>' <EOL> db_table = '<STR_LIT>' <EOL> __repr__ = sane_repr ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> def __unicode__ ( self ) : <EOL> return self . provider <EOL> def get_provider ( self ) : <EOL> from sentry . auth import manager <EOL> return manager . get ( self . provider , ** self . config ) <EOL> def get_audit_log_data ( self ) : <EOL> return { <EOL> '<STR_LIT>' : self . provider , <EOL> '<STR_LIT>' : self . config , <EOL> } </s>
